| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_VIEWS_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
| 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| 11 #include <vector> | 11 #include <vector> |
| 12 | 12 |
| 13 #include "base/scoped_ptr.h" | 13 #include "base/scoped_ptr.h" |
| 14 #include "base/time.h" | 14 #include "base/time.h" |
| 15 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 15 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
| 16 #include "gfx/native_widget_types.h" | 16 #include "gfx/native_widget_types.h" |
| 17 #include "views/controls/native/native_view_host.h" | 17 #include "views/controls/native/native_view_host.h" |
| 18 #include "views/event.h" | 18 #include "views/event.h" |
| 19 #include "views/view.h" | 19 #include "views/view.h" |
| 20 #include "webkit/glue/webcursor.h" | 20 #include "webkit/glue/webcursor.h" |
| 21 | 21 |
| 22 class RenderWidgetHost; | 22 class RenderWidgetHost; |
| 23 class GpuViewHost; | |
| 24 struct NativeWebKeyboardEvent; | 23 struct NativeWebKeyboardEvent; |
| 25 | 24 |
| 26 namespace WebKit { | 25 namespace WebKit { |
| 27 class WebMouseEvent; | 26 class WebMouseEvent; |
| 28 } | 27 } |
| 29 | 28 |
| 30 // ----------------------------------------------------------------------------- | 29 // ----------------------------------------------------------------------------- |
| 31 // See comments in render_widget_host_view.h about this class and its members. | 30 // See comments in render_widget_host_view.h about this class and its members. |
| 32 // ----------------------------------------------------------------------------- | 31 // ----------------------------------------------------------------------------- |
| 33 class RenderWidgetHostViewViews : public RenderWidgetHostView, | 32 class RenderWidgetHostViewViews : public RenderWidgetHostView, |
| (...skipping 30 matching lines...) Expand all Loading... |
| 64 virtual void DidUpdateBackingStore( | 63 virtual void DidUpdateBackingStore( |
| 65 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, | 64 const gfx::Rect& scroll_rect, int scroll_dx, int scroll_dy, |
| 66 const std::vector<gfx::Rect>& copy_rects); | 65 const std::vector<gfx::Rect>& copy_rects); |
| 67 virtual void RenderViewGone(); | 66 virtual void RenderViewGone(); |
| 68 virtual void Destroy(); | 67 virtual void Destroy(); |
| 69 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {} | 68 virtual void WillDestroyRenderWidget(RenderWidgetHost* rwh) {} |
| 70 virtual void SetTooltipText(const std::wstring& tooltip_text); | 69 virtual void SetTooltipText(const std::wstring& tooltip_text); |
| 71 virtual void SelectionChanged(const std::string& text); | 70 virtual void SelectionChanged(const std::string& text); |
| 72 virtual void ShowingContextMenu(bool showing); | 71 virtual void ShowingContextMenu(bool showing); |
| 73 virtual BackingStore* AllocBackingStore(const gfx::Size& size); | 72 virtual BackingStore* AllocBackingStore(const gfx::Size& size); |
| 74 virtual VideoLayer* AllocVideoLayer(const gfx::Size& size); | |
| 75 virtual void SetBackground(const SkBitmap& background); | 73 virtual void SetBackground(const SkBitmap& background); |
| 76 virtual void CreatePluginContainer(gfx::PluginWindowHandle id); | 74 virtual void CreatePluginContainer(gfx::PluginWindowHandle id); |
| 77 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id); | 75 virtual void DestroyPluginContainer(gfx::PluginWindowHandle id); |
| 78 virtual void SetVisuallyDeemphasized(bool deemphasized); | 76 virtual void SetVisuallyDeemphasized(bool deemphasized); |
| 79 virtual bool ContainsNativeView(gfx::NativeView native_view) const; | 77 virtual bool ContainsNativeView(gfx::NativeView native_view) const; |
| 80 | 78 |
| 81 gfx::NativeView native_view() const; | 79 gfx::NativeView native_view() const; |
| 82 virtual gfx::NativeView GetNativeView() { return native_view(); } | 80 virtual gfx::NativeView GetNativeView() { return native_view(); } |
| 83 | 81 |
| 84 virtual void Paint(gfx::Canvas* canvas); | 82 virtual void Paint(gfx::Canvas* canvas); |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 // Update the display cursor for the render view. | 114 // Update the display cursor for the render view. |
| 117 void ShowCurrentCursor(); | 115 void ShowCurrentCursor(); |
| 118 | 116 |
| 119 // Translate a views::MouseEvent into a WebKit::WebMouseEvent. | 117 // Translate a views::MouseEvent into a WebKit::WebMouseEvent. |
| 120 WebKit::WebMouseEvent WebMouseEventFromViewsEvent( | 118 WebKit::WebMouseEvent WebMouseEventFromViewsEvent( |
| 121 const views::MouseEvent& event); | 119 const views::MouseEvent& event); |
| 122 | 120 |
| 123 // The model object. | 121 // The model object. |
| 124 RenderWidgetHost* host_; | 122 RenderWidgetHost* host_; |
| 125 | 123 |
| 126 // Cached value of --enable-gpu-rendering for out-of-process painting. | |
| 127 bool enable_gpu_rendering_; | |
| 128 | |
| 129 // Non-NULL when we're doing out-of-process painting. | |
| 130 scoped_ptr<GpuViewHost> gpu_view_host_; | |
| 131 | |
| 132 // This is true when we are currently painting and thus should handle extra | 124 // This is true when we are currently painting and thus should handle extra |
| 133 // paint requests by expanding the invalid rect rather than actually | 125 // paint requests by expanding the invalid rect rather than actually |
| 134 // painting. | 126 // painting. |
| 135 bool about_to_validate_and_paint_; | 127 bool about_to_validate_and_paint_; |
| 136 | 128 |
| 137 // This is the rectangle which we'll paint. | 129 // This is the rectangle which we'll paint. |
| 138 gfx::Rect invalid_rect_; | 130 gfx::Rect invalid_rect_; |
| 139 | 131 |
| 140 // Whether or not this widget is hidden. | 132 // Whether or not this widget is hidden. |
| 141 bool is_hidden_; | 133 bool is_hidden_; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 160 // If true, fade the render widget when painting it. | 152 // If true, fade the render widget when painting it. |
| 161 bool visually_deemphasized_; | 153 bool visually_deemphasized_; |
| 162 | 154 |
| 163 // The size that we want the renderer to be. | 155 // The size that we want the renderer to be. |
| 164 gfx::Size requested_size_; | 156 gfx::Size requested_size_; |
| 165 | 157 |
| 166 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); | 158 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewViews); |
| 167 }; | 159 }; |
| 168 | 160 |
| 169 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ | 161 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_VIEWS_H_ |
| OLD | NEW |