Hello andreip,

I'd like you to do a code review.  Please execute
        g4 diff -c 9447321

or point your web browser to
        http://mondrian/9447321

to review the following code:

Change 9447321 by stevebl...@steveblock-gears3 on 2008/12/17 12:36:46 *pending*

        Implements HTML dialog for Opera. Mailed on behalf of Opera.
        
        R=andreip
        [email protected],[email protected]
        DELTA=22  (16 added, 0 deleted, 6 changed)
        OCL=9447321

Affected files ...

... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#68 edit
... //depot/googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc#1 
edit

22 delta lines: 16 added, 0 deleted, 6 changed

Also consider running:
        g4 lint -c 9447321

which verifies that the changelist doesn't introduce new style violations.

If you can't do the review, please let me know as soon as possible.  During
your review, please ensure that all new code has corresponding unit tests and
that existing unit tests are updated appropriately.  Visit
http://www/eng/code_review.html for more information.

This is a semiautomated message from "g4 mail".  Complaints or suggestions?
Mail [email protected].
Change 9447321 by stevebl...@steveblock-gears3 on 2008/12/17 12:36:46 *pending*

        Implements HTML dialog for Opera. Mailed on behalf of Opera.
        
        R=andreip
        [email protected],[email protected]
        DELTA=31  (14 added, 4 deleted, 13 changed)
        OCL=9447321

Affected files ...

... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#68 edit
... //depot/googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc#1 
edit

==== //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#68 - 
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/desktop/desktop.cc ====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop.cc      2008-12-17 
12:38:29.000000000 +0000
+++ googleclient/gears/opensource/gears/desktop/desktop.cc      2008-12-17 
12:21:38.000000000 +0000
@@ -375,7 +375,7 @@
   const int kShortcutsDialogWidth = 360;
   const int kShortcutsDialogHeight = 320;
 
-  HtmlDialog shortcuts_dialog(NULL);
+  HtmlDialog shortcuts_dialog(EnvPageBrowsingContext());
   if (desktop.InitializeDialog(&shortcut_info, &shortcuts_dialog,
                                Desktop::DIALOG_STYLE_STANDARD)) {
     HtmlDialogReturnValue dialog_result = shortcuts_dialog.DoModal(
==== //depot/googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc#1 - 
c:\MyDocs\Gears3/googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc 
====
# action=edit type=text
--- googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc      
2008-12-17 12:38:29.000000000 +0000
+++ googleclient/gears/opensource/gears/ui/opera/html_dialog_op.cc      
2008-12-17 12:49:27.000000000 +0000
@@ -26,15 +26,27 @@
 #include "gears/ui/common/html_dialog.h"
 
 #include <assert.h>
+#include "gears/base/common/js_types.h"
+#include "gears/base/opera/browsing_context_op.h"
+#include "gears/base/opera/opera_utils.h"
+#include "third_party/opera/opera_callback_api.h"
 
 
 bool HtmlDialog::DoModalImpl(const char16 *html_filename,
                              int width,
                              int height,
                              const char16 *arguments_string) {
-  // TODO(steveblock): Implement me.
-  assert(false);
-  return false;
+  OperaGearsApiInterface *opera_api = OperaUtils::GetBrowserApiForGears();
+
+  const unsigned short *result;
+
+  OPBrowsingContext *context =
+      static_cast<OPBrowsingContext*>(browsing_context_);
+  opera_api->OpenDialog(context ? context->GetJsContext() : NULL,
+                        html_filename, width, height,
+                        arguments_string, &result);
+
+  return SetResult(result);
 }
 
 bool HtmlDialog::DoModelessImpl(const char16 *html_filename,
@@ -43,13 +55,17 @@
                                 const char16 *arguments_string,
                                 ModelessCompletionCallback callback,
                                 void *closure) {
-  // TODO(steveblock): Implement me.
+  // Unused in Opera.
   assert(false);
   return false;
 }
 
 bool HtmlDialog::GetLocale(std::string16 *locale) {
-  // TODO(steveblock): Implement me.
+#ifdef OS_WINCE
+  return GetCurrentSystemLocale(locale);
+#else
+  // TODO([email protected]): Get the correct locale.
   assert(false);
   return false;
+#endif
 }

Reply via email to