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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <map> | 9 #include <map> |
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/property_bag.h" | 16 #include "base/property_bag.h" |
17 #include "content/browser/browser_plugin/browser_plugin_web_contents_observer.h" | 17 #include "content/browser/browser_plugin/browser_plugin_web_contents_observer.h" |
18 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" | 18 #include "content/browser/renderer_host/java/java_bridge_dispatcher_host_manager
.h" |
| 19 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
19 #include "content/browser/web_contents/navigation_controller_impl.h" | 20 #include "content/browser/web_contents/navigation_controller_impl.h" |
20 #include "content/browser/web_contents/render_view_host_manager.h" | 21 #include "content/browser/web_contents/render_view_host_manager.h" |
21 #include "content/common/content_export.h" | 22 #include "content/common/content_export.h" |
22 #include "content/public/browser/notification_observer.h" | 23 #include "content/public/browser/notification_observer.h" |
23 #include "content/public/browser/notification_registrar.h" | 24 #include "content/public/browser/notification_registrar.h" |
24 #include "content/public/browser/render_view_host_delegate.h" | 25 #include "content/public/browser/render_view_host_delegate.h" |
25 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
26 #include "content/public/common/renderer_preferences.h" | 27 #include "content/public/common/renderer_preferences.h" |
27 #include "net/base/load_states.h" | 28 #include "net/base/load_states.h" |
28 #include "ui/gfx/size.h" | 29 #include "ui/gfx/size.h" |
(...skipping 22 matching lines...) Expand all Loading... |
51 struct LoadNotificationDetails; | 52 struct LoadNotificationDetails; |
52 } | 53 } |
53 | 54 |
54 namespace webkit_glue { | 55 namespace webkit_glue { |
55 struct WebIntentData; | 56 struct WebIntentData; |
56 } | 57 } |
57 | 58 |
58 class CONTENT_EXPORT WebContentsImpl | 59 class CONTENT_EXPORT WebContentsImpl |
59 : public NON_EXPORTED_BASE(content::WebContents), | 60 : public NON_EXPORTED_BASE(content::WebContents), |
60 public content::RenderViewHostDelegate, | 61 public content::RenderViewHostDelegate, |
| 62 public content::RenderWidgetHostDelegate, |
61 public RenderViewHostManager::Delegate, | 63 public RenderViewHostManager::Delegate, |
62 public content::NotificationObserver { | 64 public content::NotificationObserver { |
63 public: | 65 public: |
64 // See WebContents::Create for a description of these parameters. | 66 // See WebContents::Create for a description of these parameters. |
65 WebContentsImpl(content::BrowserContext* browser_context, | 67 WebContentsImpl(content::BrowserContext* browser_context, |
66 content::SiteInstance* site_instance, | 68 content::SiteInstance* site_instance, |
67 int routing_id, | 69 int routing_id, |
68 const WebContentsImpl* base_web_contents, | 70 const WebContentsImpl* base_web_contents, |
69 WebContentsImpl* opener, | 71 WebContentsImpl* opener, |
70 SessionStorageNamespaceImpl* session_storage_namespace); | 72 SessionStorageNamespaceImpl* session_storage_namespace); |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
336 virtual void RendererResponsive( | 338 virtual void RendererResponsive( |
337 content::RenderViewHost* render_view_host) OVERRIDE; | 339 content::RenderViewHost* render_view_host) OVERRIDE; |
338 virtual void LoadStateChanged(const GURL& url, | 340 virtual void LoadStateChanged(const GURL& url, |
339 const net::LoadStateWithParam& load_state, | 341 const net::LoadStateWithParam& load_state, |
340 uint64 upload_position, | 342 uint64 upload_position, |
341 uint64 upload_size) OVERRIDE; | 343 uint64 upload_size) OVERRIDE; |
342 virtual void WorkerCrashed() OVERRIDE; | 344 virtual void WorkerCrashed() OVERRIDE; |
343 virtual void Activate() OVERRIDE; | 345 virtual void Activate() OVERRIDE; |
344 virtual void Deactivate() OVERRIDE; | 346 virtual void Deactivate() OVERRIDE; |
345 virtual void LostCapture() OVERRIDE; | 347 virtual void LostCapture() OVERRIDE; |
346 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, | |
347 bool* is_keyboard_shortcut) OVERRIDE; | |
348 virtual void HandleKeyboardEvent( | |
349 const NativeWebKeyboardEvent& event) OVERRIDE; | |
350 virtual void HandleMouseDown() OVERRIDE; | 348 virtual void HandleMouseDown() OVERRIDE; |
351 virtual void HandleMouseUp() OVERRIDE; | 349 virtual void HandleMouseUp() OVERRIDE; |
352 virtual void HandleMouseActivate() OVERRIDE; | 350 virtual void HandleMouseActivate() OVERRIDE; |
353 virtual void RunFileChooser( | 351 virtual void RunFileChooser( |
354 content::RenderViewHost* render_view_host, | 352 content::RenderViewHost* render_view_host, |
355 const content::FileChooserParams& params) OVERRIDE; | 353 const content::FileChooserParams& params) OVERRIDE; |
356 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; | 354 virtual void ToggleFullscreenMode(bool enter_fullscreen) OVERRIDE; |
357 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; | 355 virtual bool IsFullscreenForCurrentTab() const OVERRIDE; |
358 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; | 356 virtual void UpdatePreferredSize(const gfx::Size& pref_size) OVERRIDE; |
359 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; | 357 virtual void ResizeDueToAutoResize(const gfx::Size& new_size) OVERRIDE; |
360 virtual void RequestToLockMouse(bool user_gesture) OVERRIDE; | 358 virtual void RequestToLockMouse(bool user_gesture) OVERRIDE; |
361 virtual void LostMouseLock() OVERRIDE; | 359 virtual void LostMouseLock() OVERRIDE; |
362 | 360 |
| 361 // RenderWidgetHostDelegate -------------------------------------------------- |
| 362 |
| 363 virtual bool PreHandleKeyboardEvent(const NativeWebKeyboardEvent& event, |
| 364 bool* is_keyboard_shortcut) OVERRIDE; |
| 365 virtual void HandleKeyboardEvent( |
| 366 const NativeWebKeyboardEvent& event) OVERRIDE; |
| 367 |
363 // RenderViewHostManager::Delegate ------------------------------------------- | 368 // RenderViewHostManager::Delegate ------------------------------------------- |
364 | 369 |
365 virtual bool CreateRenderViewForRenderManager( | 370 virtual bool CreateRenderViewForRenderManager( |
366 content::RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; | 371 content::RenderViewHost* render_view_host, int opener_route_id) OVERRIDE; |
367 virtual void BeforeUnloadFiredFromRenderManager( | 372 virtual void BeforeUnloadFiredFromRenderManager( |
368 bool proceed, | 373 bool proceed, |
369 bool* proceed_to_fire_unload) OVERRIDE; | 374 bool* proceed_to_fire_unload) OVERRIDE; |
370 virtual void DidStartLoadingFromRenderManager( | 375 virtual void DidStartLoadingFromRenderManager( |
371 content::RenderViewHost* render_view_host) OVERRIDE; | 376 content::RenderViewHost* render_view_host) OVERRIDE; |
372 virtual void RenderViewGoneFromRenderManager( | 377 virtual void RenderViewGoneFromRenderManager( |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
717 // Type of view this WebContents is displaying. | 722 // Type of view this WebContents is displaying. |
718 content::ViewType view_type_; | 723 content::ViewType view_type_; |
719 | 724 |
720 // Color chooser that was opened by this tab. | 725 // Color chooser that was opened by this tab. |
721 content::ColorChooser* color_chooser_; | 726 content::ColorChooser* color_chooser_; |
722 | 727 |
723 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 728 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
724 }; | 729 }; |
725 | 730 |
726 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 731 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |