| 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 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 34 #include "content/public/common/stop_find_action.h" | 34 #include "content/public/common/stop_find_action.h" |
| 35 #include "content/public/common/top_controls_state.h" | 35 #include "content/public/common/top_controls_state.h" |
| 36 #include "content/public/renderer/render_view.h" | 36 #include "content/public/renderer/render_view.h" |
| 37 #include "content/renderer/media/webmediaplayer_delegate.h" | 37 #include "content/renderer/media/webmediaplayer_delegate.h" |
| 38 #include "content/renderer/mouse_lock_dispatcher.h" | 38 #include "content/renderer/mouse_lock_dispatcher.h" |
| 39 #include "content/renderer/render_frame_impl.h" | 39 #include "content/renderer/render_frame_impl.h" |
| 40 #include "content/renderer/render_view_pepper_helper.h" | 40 #include "content/renderer/render_view_pepper_helper.h" |
| 41 #include "content/renderer/render_widget.h" | 41 #include "content/renderer/render_widget.h" |
| 42 #include "content/renderer/renderer_webcookiejar_impl.h" | 42 #include "content/renderer/renderer_webcookiejar_impl.h" |
| 43 #include "content/renderer/stats_collection_observer.h" | 43 #include "content/renderer/stats_collection_observer.h" |
| 44 #include "content/renderer/webplugin_page_delegate.h" |
| 44 #include "ipc/ipc_platform_file.h" | 45 #include "ipc/ipc_platform_file.h" |
| 45 #include "third_party/WebKit/public/platform/WebFileSystem.h" | 46 #include "third_party/WebKit/public/platform/WebFileSystem.h" |
| 46 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" | 47 #include "third_party/WebKit/public/platform/WebGraphicsContext3D.h" |
| 47 #include "third_party/WebKit/public/web/WebConsoleMessage.h" | 48 #include "third_party/WebKit/public/web/WebConsoleMessage.h" |
| 48 #include "third_party/WebKit/public/web/WebDataSource.h" | 49 #include "third_party/WebKit/public/web/WebDataSource.h" |
| 49 #include "third_party/WebKit/public/web/WebFrameClient.h" | 50 #include "third_party/WebKit/public/web/WebFrameClient.h" |
| 50 #include "third_party/WebKit/public/web/WebHistoryItem.h" | 51 #include "third_party/WebKit/public/web/WebHistoryItem.h" |
| 51 #include "third_party/WebKit/public/web/WebIconURL.h" | 52 #include "third_party/WebKit/public/web/WebIconURL.h" |
| 52 #include "third_party/WebKit/public/web/WebInputEvent.h" | 53 #include "third_party/WebKit/public/web/WebInputEvent.h" |
| 53 #include "third_party/WebKit/public/web/WebNavigationType.h" | 54 #include "third_party/WebKit/public/web/WebNavigationType.h" |
| 54 #include "third_party/WebKit/public/web/WebNode.h" | 55 #include "third_party/WebKit/public/web/WebNode.h" |
| 55 #include "third_party/WebKit/public/web/WebPageSerializerClient.h" | 56 #include "third_party/WebKit/public/web/WebPageSerializerClient.h" |
| 56 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" | 57 #include "third_party/WebKit/public/web/WebPageVisibilityState.h" |
| 57 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" | 58 #include "third_party/WebKit/public/web/WebSecurityOrigin.h" |
| 58 #include "third_party/WebKit/public/web/WebViewClient.h" | 59 #include "third_party/WebKit/public/web/WebViewClient.h" |
| 59 #include "ui/base/ui_base_types.h" | 60 #include "ui/base/ui_base_types.h" |
| 60 #include "ui/surface/transport_dib.h" | 61 #include "ui/surface/transport_dib.h" |
| 61 #include "webkit/common/webpreferences.h" | 62 #include "webkit/common/webpreferences.h" |
| 62 #include "webkit/plugins/npapi/webplugin_page_delegate.h" | |
| 63 | 63 |
| 64 #if defined(OS_ANDROID) | 64 #if defined(OS_ANDROID) |
| 65 #include "content/renderer/android/content_detector.h" | 65 #include "content/renderer/android/content_detector.h" |
| 66 #include "third_party/WebKit/public/web/WebContentDetectionResult.h" | 66 #include "third_party/WebKit/public/web/WebContentDetectionResult.h" |
| 67 #endif | 67 #endif |
| 68 | 68 |
| 69 #if defined(COMPILER_MSVC) | 69 #if defined(COMPILER_MSVC) |
| 70 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the | 70 // RenderViewImpl is a diamond-shaped hierarchy, with WebWidgetClient at the |
| 71 // root. VS warns when we inherit the WebWidgetClient method implementations | 71 // root. VS warns when we inherit the WebWidgetClient method implementations |
| 72 // from RenderWidget. It's safe to ignore that warning. | 72 // from RenderWidget. It's safe to ignore that warning. |
| (...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // | 189 // |
| 190 // RenderView is an object that manages a WebView object, and provides a | 190 // RenderView is an object that manages a WebView object, and provides a |
| 191 // communication interface with an embedding application process | 191 // communication interface with an embedding application process |
| 192 // | 192 // |
| 193 class CONTENT_EXPORT RenderViewImpl | 193 class CONTENT_EXPORT RenderViewImpl |
| 194 : public RenderWidget, | 194 : public RenderWidget, |
| 195 NON_EXPORTED_BASE(public WebKit::WebViewClient), | 195 NON_EXPORTED_BASE(public WebKit::WebViewClient), |
| 196 NON_EXPORTED_BASE(public WebKit::WebFrameClient), | 196 NON_EXPORTED_BASE(public WebKit::WebFrameClient), |
| 197 NON_EXPORTED_BASE(public WebKit::WebPageSerializerClient), | 197 NON_EXPORTED_BASE(public WebKit::WebPageSerializerClient), |
| 198 public RenderView, | 198 public RenderView, |
| 199 NON_EXPORTED_BASE(public webkit::npapi::WebPluginPageDelegate), | 199 NON_EXPORTED_BASE(public WebPluginPageDelegate), |
| 200 NON_EXPORTED_BASE(public WebMediaPlayerDelegate), | 200 NON_EXPORTED_BASE(public WebMediaPlayerDelegate), |
| 201 public base::SupportsWeakPtr<RenderViewImpl> { | 201 public base::SupportsWeakPtr<RenderViewImpl> { |
| 202 public: | 202 public: |
| 203 // Creates a new RenderView. If this is a blocked popup or as a new tab, | 203 // Creates a new RenderView. If this is a blocked popup or as a new tab, |
| 204 // opener_id is the routing ID of the RenderView responsible for creating this | 204 // opener_id is the routing ID of the RenderView responsible for creating this |
| 205 // RenderView. |counter| is either a currently initialized counter, or NULL | 205 // RenderView. |counter| is either a currently initialized counter, or NULL |
| 206 // (in which case we treat this RenderView as a top level window). | 206 // (in which case we treat this RenderView as a top level window). |
| 207 static RenderViewImpl* Create( | 207 static RenderViewImpl* Create( |
| 208 int32 opener_id, | 208 int32 opener_id, |
| 209 const RendererPreferences& renderer_prefs, | 209 const RendererPreferences& renderer_prefs, |
| (...skipping 532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 742 virtual void ClearEditCommands() OVERRIDE; | 742 virtual void ClearEditCommands() OVERRIDE; |
| 743 virtual SSLStatus GetSSLStatusOfFrame(WebKit::WebFrame* frame) const OVERRIDE; | 743 virtual SSLStatus GetSSLStatusOfFrame(WebKit::WebFrame* frame) const OVERRIDE; |
| 744 #if defined(OS_ANDROID) | 744 #if defined(OS_ANDROID) |
| 745 virtual void UpdateTopControlsState(TopControlsState constraints, | 745 virtual void UpdateTopControlsState(TopControlsState constraints, |
| 746 TopControlsState current, | 746 TopControlsState current, |
| 747 bool animate) OVERRIDE; | 747 bool animate) OVERRIDE; |
| 748 #endif | 748 #endif |
| 749 | 749 |
| 750 // webkit_glue::WebPluginPageDelegate implementation ------------------------- | 750 // webkit_glue::WebPluginPageDelegate implementation ------------------------- |
| 751 | 751 |
| 752 virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate( | 752 virtual WebPluginDelegate* CreatePluginDelegate( |
| 753 const base::FilePath& file_path, | 753 const base::FilePath& file_path, |
| 754 const std::string& mime_type) OVERRIDE; | 754 const std::string& mime_type) OVERRIDE; |
| 755 virtual WebKit::WebPlugin* CreatePluginReplacement( | 755 virtual WebKit::WebPlugin* CreatePluginReplacement( |
| 756 const base::FilePath& file_path) OVERRIDE; | 756 const base::FilePath& file_path) OVERRIDE; |
| 757 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) OVERRIDE; | 757 virtual void CreatedPluginWindow(gfx::PluginWindowHandle handle) OVERRIDE; |
| 758 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) OVERRIDE; | 758 virtual void WillDestroyPluginWindow(gfx::PluginWindowHandle handle) OVERRIDE; |
| 759 virtual void DidMovePlugin( | 759 virtual void DidMovePlugin(const WebPluginGeometry& move) OVERRIDE; |
| 760 const webkit::npapi::WebPluginGeometry& move) OVERRIDE; | |
| 761 virtual void DidStartLoadingForPlugin() OVERRIDE; | 760 virtual void DidStartLoadingForPlugin() OVERRIDE; |
| 762 virtual void DidStopLoadingForPlugin() OVERRIDE; | 761 virtual void DidStopLoadingForPlugin() OVERRIDE; |
| 763 virtual WebKit::WebCookieJar* GetCookieJar() OVERRIDE; | 762 virtual WebKit::WebCookieJar* GetCookieJar() OVERRIDE; |
| 764 | 763 |
| 765 // WebMediaPlayerDelegate implementation ----------------------- | 764 // WebMediaPlayerDelegate implementation ----------------------- |
| 766 | 765 |
| 767 virtual void DidPlay(WebKit::WebMediaPlayer* player) OVERRIDE; | 766 virtual void DidPlay(WebKit::WebMediaPlayer* player) OVERRIDE; |
| 768 virtual void DidPause(WebKit::WebMediaPlayer* player) OVERRIDE; | 767 virtual void DidPause(WebKit::WebMediaPlayer* player) OVERRIDE; |
| 769 virtual void PlayerGone(WebKit::WebMediaPlayer* player) OVERRIDE; | 768 virtual void PlayerGone(WebKit::WebMediaPlayer* player) OVERRIDE; |
| 770 | 769 |
| (...skipping 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1574 // use the Observer interface to filter IPC messages and receive frame change | 1573 // use the Observer interface to filter IPC messages and receive frame change |
| 1575 // notifications. | 1574 // notifications. |
| 1576 // --------------------------------------------------------------------------- | 1575 // --------------------------------------------------------------------------- |
| 1577 | 1576 |
| 1578 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); | 1577 DISALLOW_COPY_AND_ASSIGN(RenderViewImpl); |
| 1579 }; | 1578 }; |
| 1580 | 1579 |
| 1581 } // namespace content | 1580 } // namespace content |
| 1582 | 1581 |
| 1583 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ | 1582 #endif // CONTENT_RENDERER_RENDER_VIEW_IMPL_H_ |
| OLD | NEW |