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 CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
7 | 7 |
8 #include "base/gfx/native_widget_types.h" | 8 #include "base/gfx/native_widget_types.h" |
9 #include "base/shared_memory.h" | 9 #include "base/shared_memory.h" |
10 #include "webkit/glue/webplugin.h" | 10 #include "webkit/glue/webplugin.h" |
11 | 11 |
12 namespace gfx { | 12 namespace gfx { |
13 class Rect; | 13 class Rect; |
14 class Size; | 14 class Size; |
15 } | 15 } |
16 namespace IPC { | 16 namespace IPC { |
17 class Message; | 17 class Message; |
18 } | 18 } |
19 | 19 |
| 20 class BackingStore; |
20 class RenderProcessHost; | 21 class RenderProcessHost; |
21 class RenderWidgetHost; | 22 class RenderWidgetHost; |
22 class WebCursor; | 23 class WebCursor; |
23 | 24 |
24 // RenderWidgetHostView is an interface implemented by an object that acts as | 25 // RenderWidgetHostView is an interface implemented by an object that acts as |
25 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its | 26 // the "View" portion of a RenderWidgetHost. The RenderWidgetHost and its |
26 // associated RenderProcessHost own the "Model" in this case which is the | 27 // associated RenderProcessHost own the "Model" in this case which is the |
27 // child renderer process. The View is responsible for receiving events from | 28 // child renderer process. The View is responsible for receiving events from |
28 // the surrounding environment and passing them to the RenderWidgetHost, and | 29 // the surrounding environment and passing them to the RenderWidgetHost, and |
29 // for actually displaying the content of the RenderWidgetHost when it | 30 // for actually displaying the content of the RenderWidgetHost when it |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 // Notifies the View that the renderer has ceased to exist. | 103 // Notifies the View that the renderer has ceased to exist. |
103 virtual void RenderViewGone() = 0; | 104 virtual void RenderViewGone() = 0; |
104 | 105 |
105 // Tells the View to destroy itself. | 106 // Tells the View to destroy itself. |
106 virtual void Destroy() = 0; | 107 virtual void Destroy() = 0; |
107 | 108 |
108 // Tells the View that the tooltip text for the current mouse position over | 109 // Tells the View that the tooltip text for the current mouse position over |
109 // the page has changed. | 110 // the page has changed. |
110 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; | 111 virtual void SetTooltipText(const std::wstring& tooltip_text) = 0; |
111 | 112 |
| 113 // Allocate a backing store for this view |
| 114 virtual BackingStore* AllocBackingStore(const gfx::Size& size) = 0; |
| 115 |
112 protected: | 116 protected: |
113 // Interface class only, do not construct. | 117 // Interface class only, do not construct. |
114 RenderWidgetHostView() {} | 118 RenderWidgetHostView() {} |
115 | 119 |
116 private: | 120 private: |
117 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); | 121 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostView); |
118 }; | 122 }; |
119 | 123 |
120 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ | 124 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_H_ |
121 | 125 |
OLD | NEW |