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> |
(...skipping 14 matching lines...) Expand all Loading... |
25 #include "content/browser/media/audio_stream_monitor.h" | 25 #include "content/browser/media/audio_stream_monitor.h" |
26 #include "content/browser/renderer_host/render_view_host_delegate.h" | 26 #include "content/browser/renderer_host/render_view_host_delegate.h" |
27 #include "content/browser/renderer_host/render_view_host_impl.h" | 27 #include "content/browser/renderer_host/render_view_host_impl.h" |
28 #include "content/browser/renderer_host/render_widget_host_delegate.h" | 28 #include "content/browser/renderer_host/render_widget_host_delegate.h" |
29 #include "content/common/accessibility_mode_enums.h" | 29 #include "content/common/accessibility_mode_enums.h" |
30 #include "content/common/content_export.h" | 30 #include "content/common/content_export.h" |
31 #include "content/public/browser/color_chooser.h" | 31 #include "content/public/browser/color_chooser.h" |
32 #include "content/public/browser/notification_observer.h" | 32 #include "content/public/browser/notification_observer.h" |
33 #include "content/public/browser/notification_registrar.h" | 33 #include "content/public/browser/notification_registrar.h" |
34 #include "content/public/browser/web_contents.h" | 34 #include "content/public/browser/web_contents.h" |
| 35 #include "content/public/common/page_importance_signals.h" |
35 #include "content/public/common/renderer_preferences.h" | 36 #include "content/public/common/renderer_preferences.h" |
36 #include "content/public/common/resource_type.h" | 37 #include "content/public/common/resource_type.h" |
37 #include "content/public/common/three_d_api_types.h" | 38 #include "content/public/common/three_d_api_types.h" |
38 #include "net/base/load_states.h" | 39 #include "net/base/load_states.h" |
39 #include "net/http/http_response_headers.h" | 40 #include "net/http/http_response_headers.h" |
40 #include "third_party/WebKit/public/web/WebDragOperation.h" | 41 #include "third_party/WebKit/public/web/WebDragOperation.h" |
41 #include "ui/base/page_transition_types.h" | 42 #include "ui/base/page_transition_types.h" |
42 #include "ui/gfx/geometry/rect_f.h" | 43 #include "ui/gfx/geometry/rect_f.h" |
43 #include "ui/gfx/geometry/size.h" | 44 #include "ui/gfx/geometry/size.h" |
44 | 45 |
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 WebUI* GetCommittedWebUI() const override; | 244 WebUI* GetCommittedWebUI() const override; |
244 void SetUserAgentOverride(const std::string& override) override; | 245 void SetUserAgentOverride(const std::string& override) override; |
245 const std::string& GetUserAgentOverride() const override; | 246 const std::string& GetUserAgentOverride() const override; |
246 void EnableTreeOnlyAccessibilityMode() override; | 247 void EnableTreeOnlyAccessibilityMode() override; |
247 bool IsTreeOnlyAccessibilityModeForTesting() const override; | 248 bool IsTreeOnlyAccessibilityModeForTesting() const override; |
248 bool IsFullAccessibilityModeForTesting() const override; | 249 bool IsFullAccessibilityModeForTesting() const override; |
249 #if defined(OS_WIN) | 250 #if defined(OS_WIN) |
250 void SetParentNativeViewAccessible( | 251 void SetParentNativeViewAccessible( |
251 gfx::NativeViewAccessible accessible_parent) override; | 252 gfx::NativeViewAccessible accessible_parent) override; |
252 #endif | 253 #endif |
| 254 const PageImportanceSignals& GetPageImportanceSignals() const override; |
253 const base::string16& GetTitle() const override; | 255 const base::string16& GetTitle() const override; |
254 int32 GetMaxPageID() override; | 256 int32 GetMaxPageID() override; |
255 int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override; | 257 int32 GetMaxPageIDForSiteInstance(SiteInstance* site_instance) override; |
256 SiteInstanceImpl* GetSiteInstance() const override; | 258 SiteInstanceImpl* GetSiteInstance() const override; |
257 SiteInstanceImpl* GetPendingSiteInstance() const override; | 259 SiteInstanceImpl* GetPendingSiteInstance() const override; |
258 bool IsLoading() const override; | 260 bool IsLoading() const override; |
259 bool IsLoadingToDifferentDocument() const override; | 261 bool IsLoadingToDifferentDocument() const override; |
260 bool IsWaitingForResponse() const override; | 262 bool IsWaitingForResponse() const override; |
261 const net::LoadStateWithParam& GetLoadState() const override; | 263 const net::LoadStateWithParam& GetLoadState() const override; |
262 const base::string16& GetLoadStateHost() const override; | 264 const base::string16& GetLoadStateHost() const override; |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
854 void OnDomOperationResponse(const std::string& json_string); | 856 void OnDomOperationResponse(const std::string& json_string); |
855 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 857 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
856 void OnOpenColorChooser(int color_chooser_id, | 858 void OnOpenColorChooser(int color_chooser_id, |
857 SkColor color, | 859 SkColor color, |
858 const std::vector<ColorSuggestion>& suggestions); | 860 const std::vector<ColorSuggestion>& suggestions); |
859 void OnEndColorChooser(int color_chooser_id); | 861 void OnEndColorChooser(int color_chooser_id); |
860 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); | 862 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); |
861 void OnWebUISend(const GURL& source_url, | 863 void OnWebUISend(const GURL& source_url, |
862 const std::string& name, | 864 const std::string& name, |
863 const base::ListValue& args); | 865 const base::ListValue& args); |
| 866 void OnUpdatePageImportanceSignals(const PageImportanceSignals& signals); |
864 #if defined(ENABLE_PLUGINS) | 867 #if defined(ENABLE_PLUGINS) |
865 void OnPepperInstanceCreated(); | 868 void OnPepperInstanceCreated(); |
866 void OnPepperInstanceDeleted(); | 869 void OnPepperInstanceDeleted(); |
867 void OnPepperPluginHung(int plugin_child_id, | 870 void OnPepperPluginHung(int plugin_child_id, |
868 const base::FilePath& path, | 871 const base::FilePath& path, |
869 bool is_hung); | 872 bool is_hung); |
870 void OnPluginCrashed(const base::FilePath& plugin_path, | 873 void OnPluginCrashed(const base::FilePath& plugin_path, |
871 base::ProcessId plugin_pid); | 874 base::ProcessId plugin_pid); |
872 void OnRequestPpapiBrokerPermission(int routing_id, | 875 void OnRequestPpapiBrokerPermission(int routing_id, |
873 const GURL& url, | 876 const GURL& url, |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1300 | 1303 |
1301 bool virtual_keyboard_requested_; | 1304 bool virtual_keyboard_requested_; |
1302 | 1305 |
1303 #if defined(ENABLE_BROWSER_CDMS) | 1306 #if defined(ENABLE_BROWSER_CDMS) |
1304 // Manages all the media player and CDM managers and forwards IPCs to them. | 1307 // Manages all the media player and CDM managers and forwards IPCs to them. |
1305 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1308 scoped_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1306 #endif | 1309 #endif |
1307 | 1310 |
1308 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1311 scoped_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1309 | 1312 |
| 1313 PageImportanceSignals page_importance_signals_; |
| 1314 |
1310 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; | 1315 base::WeakPtrFactory<WebContentsImpl> loading_weak_factory_; |
1311 | 1316 |
1312 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); | 1317 DISALLOW_COPY_AND_ASSIGN(WebContentsImpl); |
1313 }; | 1318 }; |
1314 | 1319 |
1315 // Dangerous methods which should never be made part of the public API, so we | 1320 // Dangerous methods which should never be made part of the public API, so we |
1316 // grant their use only to an explicit friend list (c++ attorney/client idiom). | 1321 // grant their use only to an explicit friend list (c++ attorney/client idiom). |
1317 class CONTENT_EXPORT WebContentsImpl::FriendZone { | 1322 class CONTENT_EXPORT WebContentsImpl::FriendZone { |
1318 private: | 1323 private: |
1319 friend class TestNavigationObserver; | 1324 friend class TestNavigationObserver; |
1320 friend class WebContentsAddedObserver; | 1325 friend class WebContentsAddedObserver; |
1321 friend class ContentBrowserSanityChecker; | 1326 friend class ContentBrowserSanityChecker; |
1322 | 1327 |
1323 FriendZone(); // Not instantiable. | 1328 FriendZone(); // Not instantiable. |
1324 | 1329 |
1325 // Adds/removes a callback called on creation of each new WebContents. | 1330 // Adds/removes a callback called on creation of each new WebContents. |
1326 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1331 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1327 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1332 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1328 | 1333 |
1329 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1334 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1330 }; | 1335 }; |
1331 | 1336 |
1332 } // namespace content | 1337 } // namespace content |
1333 | 1338 |
1334 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1339 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |