Hello michaeln,

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

or point your web browser to
        http://mondrian/11009220
(this changelist has been uploaded to Mondrian)

to review the following code:

Change 11009220 by n...@noel-gears on 2009/05/04 20:01:12 *pending*

        
        Add Chrome Gears Drag Drop to the build.
        
        OCL=11009220
        TEST=pulse-build-620-green
        
        PRESUBMIT=passed
        R=michaeln
        [email protected]
        DELTA=19  (6 added, 12 deleted, 1 changed)
        OCL=11009220

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#245 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#86 edit

19 delta lines: 6 added, 12 deleted, 1 changed

Also consider running:
        g4 lint -c 11009220

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 11009220 by n...@noel-gears on 2009/05/04 20:01:12 *pending*

        
        Add Chrome Gears Drag Drop to the build.
        
        OCL=11009220
        TEST=pulse-build-620-green
        
        OCL=11009220

Affected files ...

... //depot/googleclient/gears/opensource/gears/Makefile#245 edit
... //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#86 edit

==== //depot/googleclient/gears/opensource/gears/Makefile#245 - 
c:\Users\noel.GOOGLE\src-gears/googleclient/gears/opensource/gears/Makefile ====
# action=edit type=text
--- googleclient/gears/opensource/gears/Makefile        2009-05-04 
18:43:12.000000000 +1000
+++ googleclient/gears/opensource/gears/Makefile        2009-05-04 
15:19:18.000000000 +1000
@@ -1368,6 +1368,10 @@
                drag_and_drop_utils_sf.mm \
                $(NULL)
 
+CHROME_CPPSRCS += \
+               drag_and_drop_utils_cr.cc \
+               $(NULL)
+
 endif # not android
 
 NPAPI_JAVASRCS += \
==== //depot/googleclient/gears/opensource/gears/desktop/desktop.cc#86 - 
c:\Users\noel.GOOGLE\src-gears/googleclient/gears/opensource/gears/desktop/desktop.cc
 ====
# action=edit type=text
--- googleclient/gears/opensource/gears/desktop/desktop.cc      2009-05-04 
15:13:45.000000000 +1000
+++ googleclient/gears/opensource/gears/desktop/desktop.cc      2009-05-04 
19:57:10.000000000 +1000
@@ -61,6 +61,8 @@
 #include "gears/desktop/drag_and_drop_utils_ie.h"
 #elif BROWSER_WEBKIT
 #include "gears/desktop/drag_and_drop_utils_sf.h"
+#elif BROWSER_CHROME && WIN32
+#include "gears/desktop/drag_and_drop_utils_cr.h"
 #endif
 #endif
 
@@ -72,7 +74,7 @@
   RegisterMethod("openFiles", &GearsDesktop::OpenFiles);
 
 #if GEARS_DRAG_AND_DROP_API_IS_SUPPORTED_FOR_THIS_PLATFORM
-  // TODO(nigeltao): should acceptDrag be renamed finishDrag??
+  // TODO(nigeltao): submit CL 10876520, which removes acceptDrag.
   RegisterMethod("acceptDrag", &GearsDesktop::AcceptDrag);
   RegisterMethod("extractMetaData", &GearsDesktop::ExtractMetaData);
   RegisterMethod("getDragData", &GearsDesktop::GetDragData);
@@ -965,17 +967,10 @@
     return;
   }
 
-#if BROWSER_FF || BROWSER_IE || BROWSER_WEBKIT
   bool data_available = ::GetDragData(module_environment_.get(),
                                       event_as_js_object.get(),
                                       result.get(),
                                       &error);
-#else
-  // TODO(nigeltao): implement on Chromium.
-  bool data_available = false;
-  error = STRING16(L"getDragData is not supported for this platform.");
-#endif
-
   if (!error.empty()) {
     context->SetException(error);
   } else if (data_available) {
@@ -1004,7 +999,6 @@
 
   DragAndDropCursorType cursor_type = DRAG_AND_DROP_CURSOR_INVALID;
   std::string16 error;
-#if BROWSER_FF || BROWSER_IE || BROWSER_WEBKIT
   if (cursor == STRING16(L"copy")) {
     cursor_type = DRAG_AND_DROP_CURSOR_COPY;
   } else if (cursor == STRING16(L"none")) {
@@ -1018,10 +1012,6 @@
                     cursor_type,
                     &error);
   }
-#else
-  // TODO(nigeltao): implement on Chromium.
-  error = STRING16(L"setDragCursor is not supported for this platform.");
-#endif
 
   if (!error.empty()) {
     context->SetException(error);

Reply via email to