Chromium Code Reviews| 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 179 gfx::NativeViewId parent_hwnd, | 179 gfx::NativeViewId parent_hwnd, |
| 180 int32 opener_id, | 180 int32 opener_id, |
| 181 const content::RendererPreferences& renderer_prefs, | 181 const content::RendererPreferences& renderer_prefs, |
| 182 const WebPreferences& webkit_prefs, | 182 const WebPreferences& webkit_prefs, |
| 183 SharedRenderViewCounter* counter, | 183 SharedRenderViewCounter* counter, |
| 184 int32 routing_id, | 184 int32 routing_id, |
| 185 int32 surface_id, | 185 int32 surface_id, |
| 186 int64 session_storage_namespace_id, | 186 int64 session_storage_namespace_id, |
| 187 const string16& frame_name, | 187 const string16& frame_name, |
| 188 int32 next_page_id, | 188 int32 next_page_id, |
| 189 const WebKit::WebScreenInfo& screen_info); | 189 const WebKit::WebScreenInfo& screen_info, |
| 190 bool guest); | |
| 190 | 191 |
| 191 // Returns the RenderViewImpl containing the given WebView. | 192 // Returns the RenderViewImpl containing the given WebView. |
| 192 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); | 193 CONTENT_EXPORT static RenderViewImpl* FromWebView(WebKit::WebView* webview); |
| 193 | 194 |
| 194 // May return NULL when the view is closing. | 195 // May return NULL when the view is closing. |
| 195 CONTENT_EXPORT WebKit::WebView* webview() const; | 196 CONTENT_EXPORT WebKit::WebView* webview() const; |
| 196 | 197 |
| 197 // WebGraphicsContext3DSwapBuffersClient implementation. | 198 // WebGraphicsContext3DSwapBuffersClient implementation. |
| 198 | 199 |
| 199 // Called by a GraphicsContext associated with this view when swapbuffers | 200 // Called by a GraphicsContext associated with this view when swapbuffers |
| (...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 | 580 |
| 580 virtual void didSerializeDataForFrame( | 581 virtual void didSerializeDataForFrame( |
| 581 const WebKit::WebURL& frame_url, | 582 const WebKit::WebURL& frame_url, |
| 582 const WebKit::WebCString& data, | 583 const WebKit::WebCString& data, |
| 583 PageSerializationStatus status) OVERRIDE; | 584 PageSerializationStatus status) OVERRIDE; |
| 584 | 585 |
| 585 // content::RenderView implementation ---------------------------------------- | 586 // content::RenderView implementation ---------------------------------------- |
| 586 | 587 |
| 587 virtual bool Send(IPC::Message* message) OVERRIDE; | 588 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 588 virtual int GetRoutingID() const OVERRIDE; | 589 virtual int GetRoutingID() const OVERRIDE; |
| 590 bool IsGuest() const; | |
|
Lei Zhang
2012/03/20 19:30:58
Err, why is this under the "content::RenderView" s
| |
| 589 virtual int GetPageId() OVERRIDE; | 591 virtual int GetPageId() OVERRIDE; |
| 590 virtual gfx::Size GetSize() OVERRIDE; | 592 virtual gfx::Size GetSize() OVERRIDE; |
| 591 virtual gfx::NativeViewId GetHostWindow() OVERRIDE; | 593 virtual gfx::NativeViewId GetHostWindow() OVERRIDE; |
| 592 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; | 594 virtual WebPreferences& GetWebkitPreferences() OVERRIDE; |
| 593 virtual WebKit::WebView* GetWebView() OVERRIDE; | 595 virtual WebKit::WebView* GetWebView() OVERRIDE; |
| 594 virtual WebKit::WebNode GetFocusedNode() const OVERRIDE; | 596 virtual WebKit::WebNode GetFocusedNode() const OVERRIDE; |
| 595 virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE; | 597 virtual WebKit::WebNode GetContextMenuNode() const OVERRIDE; |
| 596 virtual bool IsEditableNode(const WebKit::WebNode& node) OVERRIDE; | 598 virtual bool IsEditableNode(const WebKit::WebNode& node) OVERRIDE; |
| 597 virtual WebKit::WebPlugin* CreatePlugin( | 599 virtual WebKit::WebPlugin* CreatePlugin( |
| 598 WebKit::WebFrame* frame, | 600 WebKit::WebFrame* frame, |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 720 RenderViewImpl(gfx::NativeViewId parent_hwnd, | 722 RenderViewImpl(gfx::NativeViewId parent_hwnd, |
| 721 int32 opener_id, | 723 int32 opener_id, |
| 722 const content::RendererPreferences& renderer_prefs, | 724 const content::RendererPreferences& renderer_prefs, |
| 723 const WebPreferences& webkit_prefs, | 725 const WebPreferences& webkit_prefs, |
| 724 SharedRenderViewCounter* counter, | 726 SharedRenderViewCounter* counter, |
| 725 int32 routing_id, | 727 int32 routing_id, |
| 726 int32 surface_id, | 728 int32 surface_id, |
| 727 int64 session_storage_namespace_id, | 729 int64 session_storage_namespace_id, |
| 728 const string16& frame_name, | 730 const string16& frame_name, |
| 729 int32 next_page_id, | 731 int32 next_page_id, |
| 730 const WebKit::WebScreenInfo& screen_info); | 732 const WebKit::WebScreenInfo& screen_info, |
| 733 bool guest); | |
| 731 | 734 |
| 732 // Do not delete directly. This class is reference counted. | 735 // Do not delete directly. This class is reference counted. |
| 733 virtual ~RenderViewImpl(); | 736 virtual ~RenderViewImpl(); |
| 734 | 737 |
| 735 void UpdateURL(WebKit::WebFrame* frame); | 738 void UpdateURL(WebKit::WebFrame* frame); |
| 736 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, | 739 void UpdateTitle(WebKit::WebFrame* frame, const string16& title, |
| 737 WebKit::WebTextDirection title_direction); | 740 WebKit::WebTextDirection title_direction); |
| 738 void UpdateSessionHistory(WebKit::WebFrame* frame); | 741 void UpdateSessionHistory(WebKit::WebFrame* frame); |
| 739 | 742 |
| 740 // Update current main frame's encoding and send it to browser window. | 743 // Update current main frame's encoding and send it to browser window. |
| (...skipping 547 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1288 | 1291 |
| 1289 #if defined(OS_WIN) | 1292 #if defined(OS_WIN) |
| 1290 // The ID of the focused NPAPI plug-in. | 1293 // The ID of the focused NPAPI plug-in. |
| 1291 int focused_plugin_id_; | 1294 int focused_plugin_id_; |
| 1292 #endif | 1295 #endif |
| 1293 | 1296 |
| 1294 // Allows JS to access DOM automation. The JS object is only exposed when the | 1297 // Allows JS to access DOM automation. The JS object is only exposed when the |
| 1295 // DOM automation bindings are enabled. | 1298 // DOM automation bindings are enabled. |
| 1296 scoped_ptr<DomAutomationController> dom_automation_controller_; | 1299 scoped_ptr<DomAutomationController> dom_automation_controller_; |
| 1297 | 1300 |
| 1301 // Indicates whether this RenderView is a guest of another RenderView. | |
| 1302 bool guest_; | |
| 1303 | |
| 1298 // NOTE: pepper_delegate_ should be last member because its constructor calls | 1304 // NOTE: pepper_delegate_ should be last member because its constructor calls |
| 1299 // AddObservers method of RenderViewImpl from c-tor. | 1305 // AddObservers method of RenderViewImpl from c-tor. |
| 1300 PepperPluginDelegateImpl pepper_delegate_; | 1306 PepperPluginDelegateImpl pepper_delegate_; |
| 1301 | 1307 |
| 1302 // --------------------------------------------------------------------------- | 1308 // --------------------------------------------------------------------------- |
| 1303 // ADDING NEW DATA? Please see if it fits appropriately in one of the above | 1309 // ADDING NEW DATA? Please see if it fits appropriately in one of the above |
| 1304 // sections rather than throwing it randomly at the end. If you're adding a | 1310 // sections rather than throwing it randomly at the end. If you're adding a |
| 1305 // bunch of stuff, you should probably create a helper class and put your | 1311 // bunch of stuff, you should probably create a helper class and put your |
| 1306 // data and methods on that to avoid bloating RenderView more. You can | 1312 // data and methods on that to avoid bloating RenderView more. You can |
| 1307 // use the Observer interface to filter IPC messages and receive frame change | 1313 // use the Observer interface to filter IPC messages and receive frame change |
| 1308 // notifications. | 1314 // notifications. |
| 1309 // --------------------------------------------------------------------------- | 1315 // --------------------------------------------------------------------------- |
| 1310 | 1316 |
| 1311 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1317 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1312 }; | 1318 }; |
| 1313 | 1319 |
| 1314 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1320 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |