| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 5 #ifndef CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 6 #define CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "content/renderer/render_view_selection.h" | 24 #include "content/renderer/render_view_selection.h" |
| 25 #include "content/renderer/renderer_webcookiejar_impl.h" | 25 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 26 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 27 #include "content/common/edit_command.h" | 27 #include "content/common/edit_command.h" |
| 28 #include "content/common/navigation_gesture.h" | 28 #include "content/common/navigation_gesture.h" |
| 29 #include "content/public/common/page_zoom.h" | 29 #include "content/public/common/page_zoom.h" |
| 30 #include "content/public/common/referrer.h" | 30 #include "content/public/common/referrer.h" |
| 31 #include "content/public/common/renderer_preferences.h" | 31 #include "content/public/common/renderer_preferences.h" |
| 32 #include "content/public/common/stop_find_action.h" | 32 #include "content/public/common/stop_find_action.h" |
| 33 #include "content/public/renderer/render_view.h" | 33 #include "content/public/renderer/render_view.h" |
| 34 #include "content/renderer/gpu/webgraphicscontext3d_command_buffer_impl.h" |
| 34 #include "content/renderer/pepper_plugin_delegate_impl.h" | 35 #include "content/renderer/pepper_plugin_delegate_impl.h" |
| 35 #include "content/renderer/render_widget.h" | 36 #include "content/renderer/render_widget.h" |
| 36 #include "ipc/ipc_platform_file.h" | 37 #include "ipc/ipc_platform_file.h" |
| 37 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" | 38 #include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h" |
| 38 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" | 39 #include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebFileSyste
m.h" |
| 39 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" | 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h" |
| 40 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" | 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebIconURL.h" |
| 41 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" | 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" |
| 42 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie
nt.h" | 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageSerializerClie
nt.h" |
| 43 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" | 44 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPageVisibilityStat
e.h" |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 // RenderView is an object that manages a WebView object, and provides a | 158 // RenderView is an object that manages a WebView object, and provides a |
| 158 // communication interface with an embedding application process | 159 // communication interface with an embedding application process |
| 159 // | 160 // |
| 160 class RenderViewImpl : public RenderWidget, | 161 class RenderViewImpl : public RenderWidget, |
| 161 public WebKit::WebViewClient, | 162 public WebKit::WebViewClient, |
| 162 public WebKit::WebFrameClient, | 163 public WebKit::WebFrameClient, |
| 163 public WebKit::WebPageSerializerClient, | 164 public WebKit::WebPageSerializerClient, |
| 164 public content::RenderView, | 165 public content::RenderView, |
| 165 public webkit::npapi::WebPluginPageDelegate, | 166 public webkit::npapi::WebPluginPageDelegate, |
| 166 public webkit_media::WebMediaPlayerDelegate, | 167 public webkit_media::WebMediaPlayerDelegate, |
| 168 public WebGraphicsContext3DSwapBuffersClient, |
| 167 public base::SupportsWeakPtr<RenderViewImpl> { | 169 public base::SupportsWeakPtr<RenderViewImpl> { |
| 168 public: | 170 public: |
| 169 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the | 171 // Creates a new RenderView. The parent_hwnd specifies a HWND to use as the |
| 170 // parent of the WebView HWND that will be created. If this is a blocked | 172 // parent of the WebView HWND that will be created. If this is a blocked |
| 171 // popup or as a new tab, opener_id is the routing ID of the RenderView | 173 // popup or as a new tab, opener_id is the routing ID of the RenderView |
| 172 // responsible for creating this RenderView (corresponding to parent_hwnd). | 174 // responsible for creating this RenderView (corresponding to parent_hwnd). |
| 173 // |counter| is either a currently initialized counter, or NULL (in which case | 175 // |counter| is either a currently initialized counter, or NULL (in which case |
| 174 // we treat this RenderView as a top level window). | 176 // we treat this RenderView as a top level window). |
| 175 CONTENT_EXPORT static RenderViewImpl* Create( | 177 CONTENT_EXPORT static RenderViewImpl* Create( |
| 176 gfx::NativeViewId parent_hwnd, | 178 gfx::NativeViewId parent_hwnd, |
| 177 int32 opener_id, | 179 int32 opener_id, |
| 178 const content::RendererPreferences& renderer_prefs, | 180 const content::RendererPreferences& renderer_prefs, |
| 179 const WebPreferences& webkit_prefs, | 181 const WebPreferences& webkit_prefs, |
| 180 SharedRenderViewCounter* counter, | 182 SharedRenderViewCounter* counter, |
| 181 int32 routing_id, | 183 int32 routing_id, |
| 182 int32 surface_id, | 184 int32 surface_id, |
| 183 int64 session_storage_namespace_id, | 185 int64 session_storage_namespace_id, |
| 184 const string16& frame_name, | 186 const string16& frame_name, |
| 185 int32 next_page_id); | 187 int32 next_page_id); |
| 186 | 188 |
| 187 // Returns the RenderViewImpl containing the given WebView. | 189 // Returns the RenderViewImpl containing the given WebView. |
| 188 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 190 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| 189 | 191 |
| 190 // May return NULL when the view is closing. | 192 // May return NULL when the view is closing. |
| 191 CONTENT_EXPORT WebKit::WebView* webview() const; | 193 CONTENT_EXPORT WebKit::WebView* webview() const; |
| 192 | 194 |
| 195 // WebGraphicsContext3DSwapBuffersClient implementation. |
| 196 |
| 193 // Called by a GraphicsContext associated with this view when swapbuffers | 197 // Called by a GraphicsContext associated with this view when swapbuffers |
| 194 // is posted, completes or is aborted. | 198 // is posted, completes or is aborted. |
| 195 void OnViewContextSwapBuffersPosted(); | 199 virtual void OnViewContextSwapBuffersPosted() OVERRIDE; |
| 196 void OnViewContextSwapBuffersComplete(); | 200 virtual void OnViewContextSwapBuffersComplete() OVERRIDE; |
| 197 void OnViewContextSwapBuffersAborted(); | 201 virtual void OnViewContextSwapBuffersAborted() OVERRIDE; |
| 198 | 202 |
| 199 int history_list_offset() const { return history_list_offset_; } | 203 int history_list_offset() const { return history_list_offset_; } |
| 200 | 204 |
| 201 const WebPreferences& webkit_preferences() const { | 205 const WebPreferences& webkit_preferences() const { |
| 202 return webkit_preferences_; | 206 return webkit_preferences_; |
| 203 } | 207 } |
| 204 | 208 |
| 205 void set_send_content_state_immediately(bool value) { | 209 void set_send_content_state_immediately(bool value) { |
| 206 send_content_state_immediately_ = value; | 210 send_content_state_immediately_ = value; |
| 207 } | 211 } |
| (...skipping 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1265 // bunch of stuff, you should probably create a helper class and put your | 1269 // bunch of stuff, you should probably create a helper class and put your |
| 1266 // data and methods on that to avoid bloating RenderView more. You can | 1270 // data and methods on that to avoid bloating RenderView more. You can |
| 1267 // use the Observer interface to filter IPC messages and receive frame change | 1271 // use the Observer interface to filter IPC messages and receive frame change |
| 1268 // notifications. | 1272 // notifications. |
| 1269 // --------------------------------------------------------------------------- | 1273 // --------------------------------------------------------------------------- |
| 1270 | 1274 |
| 1271 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1275 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1272 }; | 1276 }; |
| 1273 | 1277 |
| 1274 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1278 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |