| 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_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 5 #ifndef CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 6 #define CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/gtest_prod_util.h" | 13 #include "base/gtest_prod_util.h" |
| 14 #include "base/memory/scoped_ptr.h" | 14 #include "base/memory/scoped_ptr.h" |
| 15 #include "base/observer_list.h" | 15 #include "base/observer_list.h" |
| 16 #include "base/process/process.h" | 16 #include "base/process/process.h" |
| 17 #include "base/values.h" | 17 #include "base/values.h" |
| 18 #include "content/browser/frame_host/frame_tree.h" | 18 #include "content/browser/frame_host/frame_tree.h" |
| 19 #include "content/browser/frame_host/navigation_controller_delegate.h" | 19 #include "content/browser/frame_host/navigation_controller_delegate.h" |
| 20 #include "content/browser/frame_host/navigation_controller_impl.h" | 20 #include "content/browser/frame_host/navigation_controller_impl.h" |
| 21 #include "content/browser/frame_host/navigator_delegate.h" | 21 #include "content/browser/frame_host/navigator_delegate.h" |
| 22 #include "content/browser/frame_host/render_frame_host_delegate.h" |
| 22 #include "content/browser/frame_host/render_frame_host_manager.h" | 23 #include "content/browser/frame_host/render_frame_host_manager.h" |
| 23 #include "content/browser/renderer_host/render_view_host_delegate.h" | 24 #include "content/browser/renderer_host/render_view_host_delegate.h" |
| 24 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 25 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
| 25 #include "content/common/content_export.h" | 26 #include "content/common/content_export.h" |
| 26 #include "content/public/browser/notification_observer.h" | 27 #include "content/public/browser/notification_observer.h" |
| 27 #include "content/public/browser/notification_registrar.h" | 28 #include "content/public/browser/notification_registrar.h" |
| 28 #include "content/public/browser/web_contents.h" | 29 #include "content/public/browser/web_contents.h" |
| 29 #include "content/public/common/page_transition_types.h" | 30 #include "content/public/common/page_transition_types.h" |
| 30 #include "content/public/common/renderer_preferences.h" | 31 #include "content/public/common/renderer_preferences.h" |
| 31 #include "content/public/common/three_d_api_types.h" | 32 #include "content/public/common/three_d_api_types.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 | 72 |
| 72 // Factory function for the implementations that content knows about. Takes | 73 // Factory function for the implementations that content knows about. Takes |
| 73 // ownership of |delegate|. | 74 // ownership of |delegate|. |
| 74 WebContentsViewPort* CreateWebContentsView( | 75 WebContentsViewPort* CreateWebContentsView( |
| 75 WebContentsImpl* web_contents, | 76 WebContentsImpl* web_contents, |
| 76 WebContentsViewDelegate* delegate, | 77 WebContentsViewDelegate* delegate, |
| 77 RenderViewHostDelegateView** render_view_host_delegate_view); | 78 RenderViewHostDelegateView** render_view_host_delegate_view); |
| 78 | 79 |
| 79 class CONTENT_EXPORT WebContentsImpl | 80 class CONTENT_EXPORT WebContentsImpl |
| 80 : public NON_EXPORTED_BASE(WebContents), | 81 : public NON_EXPORTED_BASE(WebContents), |
| 82 public NON_EXPORTED_BASE(RenderFrameHostDelegate), |
| 81 public RenderViewHostDelegate, | 83 public RenderViewHostDelegate, |
| 82 public RenderWidgetHostDelegate, | 84 public RenderWidgetHostDelegate, |
| 83 public RenderFrameHostManager::Delegate, | 85 public RenderFrameHostManager::Delegate, |
| 84 public NotificationObserver, | 86 public NotificationObserver, |
| 85 public NON_EXPORTED_BASE(NavigationControllerDelegate), | 87 public NON_EXPORTED_BASE(NavigationControllerDelegate), |
| 86 public NON_EXPORTED_BASE(NavigatorDelegate) { | 88 public NON_EXPORTED_BASE(NavigatorDelegate) { |
| 87 public: | 89 public: |
| 88 virtual ~WebContentsImpl(); | 90 virtual ~WebContentsImpl(); |
| 89 | 91 |
| 90 static WebContentsImpl* CreateWithOpener( | 92 static WebContentsImpl* CreateWithOpener( |
| (...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 bool is_favicon, | 268 bool is_favicon, |
| 267 uint32_t max_bitmap_size, | 269 uint32_t max_bitmap_size, |
| 268 const ImageDownloadCallback& callback) OVERRIDE; | 270 const ImageDownloadCallback& callback) OVERRIDE; |
| 269 | 271 |
| 270 // Implementation of PageNavigator. | 272 // Implementation of PageNavigator. |
| 271 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; | 273 virtual WebContents* OpenURL(const OpenURLParams& params) OVERRIDE; |
| 272 | 274 |
| 273 // Implementation of IPC::Sender. | 275 // Implementation of IPC::Sender. |
| 274 virtual bool Send(IPC::Message* message) OVERRIDE; | 276 virtual bool Send(IPC::Message* message) OVERRIDE; |
| 275 | 277 |
| 278 // RenderFrameHostDelegate --------------------------------------------------- |
| 279 |
| 276 // RenderViewHostDelegate ---------------------------------------------------- | 280 // RenderViewHostDelegate ---------------------------------------------------- |
| 277 | |
| 278 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; | 281 virtual RenderViewHostDelegateView* GetDelegateView() OVERRIDE; |
| 279 virtual RenderViewHostDelegate::RendererManagement* | 282 virtual RenderViewHostDelegate::RendererManagement* |
| 280 GetRendererManagementDelegate() OVERRIDE; | 283 GetRendererManagementDelegate() OVERRIDE; |
| 281 virtual bool OnMessageReceived(RenderViewHost* render_view_host, | 284 virtual bool OnMessageReceived(RenderViewHost* render_view_host, |
| 282 const IPC::Message& message) OVERRIDE; | 285 const IPC::Message& message) OVERRIDE; |
| 283 virtual const GURL& GetURL() const OVERRIDE; | 286 virtual const GURL& GetURL() const OVERRIDE; |
| 284 virtual const GURL& GetVisibleURL() const OVERRIDE; | 287 virtual const GURL& GetVisibleURL() const OVERRIDE; |
| 285 virtual const GURL& GetLastCommittedURL() const OVERRIDE; | 288 virtual const GURL& GetLastCommittedURL() const OVERRIDE; |
| 286 virtual WebContents* GetAsWebContents() OVERRIDE; | 289 virtual WebContents* GetAsWebContents() OVERRIDE; |
| 287 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; | 290 virtual gfx::Rect GetRootWindowResizerRect() const OVERRIDE; |
| (...skipping 700 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 988 // Maps the ids of pending image downloads to their callbacks | 991 // Maps the ids of pending image downloads to their callbacks |
| 989 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; | 992 typedef std::map<int, ImageDownloadCallback> ImageDownloadMap; |
| 990 ImageDownloadMap image_download_map_; | 993 ImageDownloadMap image_download_map_; |
| 991 | 994 |
| 992 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 995 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
| 993 }; | 996 }; |
| 994 | 997 |
| 995 } // namespace content | 998 } // namespace content |
| 996 | 999 |
| 997 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1000 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |