| OLD | NEW | 
|    1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. |    1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 
|    2 // Use of this source code is governed by a BSD-style license that can be |    2 // Use of this source code is governed by a BSD-style license that can be | 
|    3 // found in the LICENSE file. |    3 // found in the LICENSE file. | 
|    4  |    4  | 
|    5 #ifndef WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |    5 #ifndef WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 
|    6 #define WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |    6 #define WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 
|    7  |    7  | 
|    8 #include "app/gfx/native_widget_types.h" |    8 #include "app/gfx/native_widget_types.h" | 
|    9 #include "base/basictypes.h" |    9 #include "base/basictypes.h" | 
|   10 #include "base/gfx/rect.h" |   10 #include "base/gfx/rect.h" | 
| (...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   87   static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); |   87   static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); | 
|   88 #elif defined(OS_MACOSX) |   88 #elif defined(OS_MACOSX) | 
|   89   // These need to be called from a non-subclass, so they need to be public. |   89   // These need to be called from a non-subclass, so they need to be public. | 
|   90  public: |   90  public: | 
|   91   void Resize(const gfx::Rect& rect); |   91   void Resize(const gfx::Rect& rect); | 
|   92   void MouseEvent(NSEvent *); |   92   void MouseEvent(NSEvent *); | 
|   93   void WheelEvent(NSEvent *); |   93   void WheelEvent(NSEvent *); | 
|   94   void KeyEvent(NSEvent *); |   94   void KeyEvent(NSEvent *); | 
|   95   void SetFocus(bool enable); |   95   void SetFocus(bool enable); | 
|   96  protected: |   96  protected: | 
|   97 #elif defined(OS_LINUX) |   97 #elif defined(TOOLKIT_USES_GTK) | 
|   98  public: |   98  public: | 
|   99   // --------------------------------------------------------------------------- |   99   // --------------------------------------------------------------------------- | 
|  100   // This is needed on Linux because the GtkWidget creation is the same between |  100   // This is needed on Linux because the GtkWidget creation is the same between | 
|  101   // both web view hosts and web widget hosts. The Windows code manages this by |  101   // both web view hosts and web widget hosts. The Windows code manages this by | 
|  102   // reusing the WndProc function (static, above). However, GTK doesn't use a |  102   // reusing the WndProc function (static, above). However, GTK doesn't use a | 
|  103   // single big callback function like that so we have a static function that |  103   // single big callback function like that so we have a static function that | 
|  104   // sets up a GtkWidget correctly. |  104   // sets up a GtkWidget correctly. | 
|  105   //   parent: a GtkBox to pack the new widget at the end of |  105   //   parent: a GtkBox to pack the new widget at the end of | 
|  106   //   host: a pointer to a WebWidgetHost (or subclass thereof) |  106   //   host: a pointer to a WebWidgetHost (or subclass thereof) | 
|  107   // --------------------------------------------------------------------------- |  107   // --------------------------------------------------------------------------- | 
| (...skipping 24 matching lines...) Expand all  Loading... | 
|  132  |  132  | 
|  133   // specifies the portion of the webwidget that needs scrolling |  133   // specifies the portion of the webwidget that needs scrolling | 
|  134   gfx::Rect scroll_rect_; |  134   gfx::Rect scroll_rect_; | 
|  135   int scroll_dx_; |  135   int scroll_dx_; | 
|  136   int scroll_dy_; |  136   int scroll_dy_; | 
|  137  |  137  | 
|  138 #if defined(OS_WIN) |  138 #if defined(OS_WIN) | 
|  139   bool track_mouse_leave_; |  139   bool track_mouse_leave_; | 
|  140 #endif |  140 #endif | 
|  141  |  141  | 
|  142 #if defined(OS_LINUX) |  142 #if defined(TOOLKIT_GTK) | 
|  143   // Since GtkWindow resize is asynchronous, we have to stash the dimensions, |  143   // Since GtkWindow resize is asynchronous, we have to stash the dimensions, | 
|  144   // so that the backing store doesn't have to wait for sizing to take place. |  144   // so that the backing store doesn't have to wait for sizing to take place. | 
|  145   gfx::Size logical_size_; |  145   gfx::Size logical_size_; | 
|  146 #endif |  146 #endif | 
|  147  |  147  | 
|  148 #ifndef NDEBUG |  148 #ifndef NDEBUG | 
|  149   bool painting_; |  149   bool painting_; | 
|  150 #endif |  150 #endif | 
|  151 }; |  151 }; | 
|  152  |  152  | 
|  153 #endif  // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ |  153 #endif  // WEBKIT_TOOLS_TEST_SHELL_WEBWIDGET_HOST_H_ | 
| OLD | NEW |