| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| 7 | 7 |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gfx/native_widget_types.h" | 10 #include "base/gfx/native_widget_types.h" |
| 11 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 11 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 12 | 12 |
| 13 class RenderWidgetHost; | 13 class RenderWidgetHost; |
| 14 | 14 |
| 15 // ----------------------------------------------------------------------------- | 15 // ----------------------------------------------------------------------------- |
| 16 // See comments in render_widget_host_view.h about this class and its members. | 16 // See comments in render_widget_host_view.h about this class and its members. |
| 17 // ----------------------------------------------------------------------------- | 17 // ----------------------------------------------------------------------------- |
| 18 class RenderWidgetHostViewGtk : public RenderWidgetHostView { | 18 class RenderWidgetHostViewGtk : public RenderWidgetHostView { |
| 19 public: | 19 public: |
| 20 RenderWidgetHostViewGtk(RenderWidgetHost* widget); | 20 RenderWidgetHostViewGtk(RenderWidgetHost* widget); |
| 21 ~RenderWidgetHostViewGtk(); | 21 ~RenderWidgetHostViewGtk(); |
| 22 | 22 |
| 23 // --------------------------------------------------------------------------- | 23 // --------------------------------------------------------------------------- |
| 24 // Implementation of RenderWidgetHostView... | 24 // Implementation of RenderWidgetHostView... |
| 25 | 25 |
| 26 RenderWidgetHost* GetRenderWidgetHost() const { return widget_; } | 26 RenderWidgetHost* GetRenderWidgetHost() const { return host_; } |
| 27 void DidBecomeSelected(); | 27 void DidBecomeSelected(); |
| 28 void WasHidden(); | 28 void WasHidden(); |
| 29 void SetSize(const gfx::Size& size); | 29 void SetSize(const gfx::Size& size); |
| 30 gfx::NativeView GetPluginNativeView(); | 30 gfx::NativeView GetPluginNativeView(); |
| 31 void MovePluginWindows( | 31 void MovePluginWindows( |
| 32 const std::vector<WebPluginGeometry>& plugin_window_moves); | 32 const std::vector<WebPluginGeometry>& plugin_window_moves); |
| 33 void Focus(); | 33 void Focus(); |
| 34 void Blur(); | 34 void Blur(); |
| 35 bool HasFocus(); | 35 bool HasFocus(); |
| 36 void Show(); | 36 void Show(); |
| 37 void Hide(); | 37 void Hide(); |
| 38 gfx::Rect GetViewBounds() const; | 38 gfx::Rect GetViewBounds() const; |
| 39 void UpdateCursor(const WebCursor& cursor); | 39 void UpdateCursor(const WebCursor& cursor); |
| 40 void UpdateCursorIfOverSelf(); | 40 void UpdateCursorIfOverSelf(); |
| 41 void SetIsLoading(bool is_loading); | 41 void SetIsLoading(bool is_loading); |
| 42 void IMEUpdateStatus(int control, const gfx::Rect& caret_rect); | 42 void IMEUpdateStatus(int control, const gfx::Rect& caret_rect); |
| 43 void DidPaintRect(const gfx::Rect& rect); | 43 void DidPaintRect(const gfx::Rect& rect); |
| 44 void DidScrollRect( | 44 void DidScrollRect( |
| 45 const gfx::Rect& rect, int dx, int dy); | 45 const gfx::Rect& rect, int dx, int dy); |
| 46 void RendererGone(); | 46 void RendererGone(); |
| 47 void Destroy(); | 47 void Destroy(); |
| 48 void SetTooltipText(const std::wstring& tooltip_text); | 48 void SetTooltipText(const std::wstring& tooltip_text); |
| 49 // --------------------------------------------------------------------------- | 49 // --------------------------------------------------------------------------- |
| 50 | 50 |
| 51 gfx::NativeView native_view() const { return view_; } | 51 gfx::NativeView native_view() const { return view_; } |
| 52 | 52 |
| 53 void Paint(const gfx::Rect&); | 53 void Paint(const gfx::Rect&); |
| 54 | 54 |
| 55 private: | 55 private: |
| 56 RenderWidgetHost *const widget_; | 56 // The model object. |
| 57 RenderWidgetHost *const host_; |
| 58 // The native UI widget. |
| 57 gfx::NativeView view_; | 59 gfx::NativeView view_; |
| 58 }; | 60 }; |
| 59 | 61 |
| 60 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ | 62 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_GTK_H_ |
| OLD | NEW |