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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <functional> | 10 #include <functional> |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "content/public/browser/notification_observer.h" | 37 #include "content/public/browser/notification_observer.h" |
38 #include "content/public/browser/notification_registrar.h" | 38 #include "content/public/browser/notification_registrar.h" |
39 #include "content/public/browser/web_contents.h" | 39 #include "content/public/browser/web_contents.h" |
40 #include "content/public/browser/web_contents_observer.h" | 40 #include "content/public/browser/web_contents_observer.h" |
41 #include "content/public/common/page_importance_signals.h" | 41 #include "content/public/common/page_importance_signals.h" |
42 #include "content/public/common/renderer_preferences.h" | 42 #include "content/public/common/renderer_preferences.h" |
43 #include "content/public/common/resource_type.h" | 43 #include "content/public/common/resource_type.h" |
44 #include "content/public/common/three_d_api_types.h" | 44 #include "content/public/common/three_d_api_types.h" |
45 #include "net/base/load_states.h" | 45 #include "net/base/load_states.h" |
46 #include "net/http/http_response_headers.h" | 46 #include "net/http/http_response_headers.h" |
| 47 #include "ppapi/features/features.h" |
47 #include "third_party/WebKit/public/platform/WebDragOperation.h" | 48 #include "third_party/WebKit/public/platform/WebDragOperation.h" |
48 #include "ui/base/page_transition_types.h" | 49 #include "ui/base/page_transition_types.h" |
49 #include "ui/gfx/geometry/rect_f.h" | 50 #include "ui/gfx/geometry/rect_f.h" |
50 #include "ui/gfx/geometry/size.h" | 51 #include "ui/gfx/geometry/size.h" |
51 | 52 |
52 struct ViewHostMsg_DateTimeDialogValue_Params; | 53 struct ViewHostMsg_DateTimeDialogValue_Params; |
53 | 54 |
54 namespace service_manager { | 55 namespace service_manager { |
55 class InterfaceProvider; | 56 class InterfaceProvider; |
56 } | 57 } |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 struct ResourceRequestDetails; | 93 struct ResourceRequestDetails; |
93 | 94 |
94 namespace mojom { | 95 namespace mojom { |
95 class CreateNewWindowParams; | 96 class CreateNewWindowParams; |
96 } | 97 } |
97 | 98 |
98 #if defined(OS_ANDROID) | 99 #if defined(OS_ANDROID) |
99 class WebContentsAndroid; | 100 class WebContentsAndroid; |
100 #endif | 101 #endif |
101 | 102 |
102 #if defined(ENABLE_PLUGINS) | 103 #if BUILDFLAG(ENABLE_PLUGINS) |
103 class PepperPlaybackObserver; | 104 class PepperPlaybackObserver; |
104 #endif | 105 #endif |
105 | 106 |
106 // Factory function for the implementations that content knows about. Takes | 107 // Factory function for the implementations that content knows about. Takes |
107 // ownership of |delegate|. | 108 // ownership of |delegate|. |
108 WebContentsView* CreateWebContentsView( | 109 WebContentsView* CreateWebContentsView( |
109 WebContentsImpl* web_contents, | 110 WebContentsImpl* web_contents, |
110 WebContentsViewDelegate* delegate, | 111 WebContentsViewDelegate* delegate, |
111 RenderViewHostDelegateView** render_view_host_delegate_view); | 112 RenderViewHostDelegateView** render_view_host_delegate_view); |
112 | 113 |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
972 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); | 973 void OnAppCacheAccessed(const GURL& manifest_url, bool blocked_by_policy); |
973 void OnOpenColorChooser(int color_chooser_id, | 974 void OnOpenColorChooser(int color_chooser_id, |
974 SkColor color, | 975 SkColor color, |
975 const std::vector<ColorSuggestion>& suggestions); | 976 const std::vector<ColorSuggestion>& suggestions); |
976 void OnEndColorChooser(int color_chooser_id); | 977 void OnEndColorChooser(int color_chooser_id); |
977 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); | 978 void OnSetSelectedColorInColorChooser(int color_chooser_id, SkColor color); |
978 void OnWebUISend(const GURL& source_url, | 979 void OnWebUISend(const GURL& source_url, |
979 const std::string& name, | 980 const std::string& name, |
980 const base::ListValue& args); | 981 const base::ListValue& args); |
981 void OnUpdatePageImportanceSignals(const PageImportanceSignals& signals); | 982 void OnUpdatePageImportanceSignals(const PageImportanceSignals& signals); |
982 #if defined(ENABLE_PLUGINS) | 983 #if BUILDFLAG(ENABLE_PLUGINS) |
983 void OnPepperInstanceCreated(int32_t pp_instance); | 984 void OnPepperInstanceCreated(int32_t pp_instance); |
984 void OnPepperInstanceDeleted(int32_t pp_instance); | 985 void OnPepperInstanceDeleted(int32_t pp_instance); |
985 void OnPepperPluginHung(int plugin_child_id, | 986 void OnPepperPluginHung(int plugin_child_id, |
986 const base::FilePath& path, | 987 const base::FilePath& path, |
987 bool is_hung); | 988 bool is_hung); |
988 void OnPepperStartsPlayback(int32_t pp_instance); | 989 void OnPepperStartsPlayback(int32_t pp_instance); |
989 void OnPepperStopsPlayback(int32_t pp_instance); | 990 void OnPepperStopsPlayback(int32_t pp_instance); |
990 void OnPluginCrashed(const base::FilePath& plugin_path, | 991 void OnPluginCrashed(const base::FilePath& plugin_path, |
991 base::ProcessId plugin_pid); | 992 base::ProcessId plugin_pid); |
992 void OnRequestPpapiBrokerPermission(int routing_id, | 993 void OnRequestPpapiBrokerPermission(int routing_id, |
993 const GURL& url, | 994 const GURL& url, |
994 const base::FilePath& plugin_path); | 995 const base::FilePath& plugin_path); |
995 | 996 |
996 // Callback function when requesting permission to access the PPAPI broker. | 997 // Callback function when requesting permission to access the PPAPI broker. |
997 // |result| is true if permission was granted. | 998 // |result| is true if permission was granted. |
998 void OnPpapiBrokerPermissionResult(int routing_id, bool result); | 999 void OnPpapiBrokerPermissionResult(int routing_id, bool result); |
999 | 1000 |
1000 void OnBrowserPluginMessage(RenderFrameHost* render_frame_host, | 1001 void OnBrowserPluginMessage(RenderFrameHost* render_frame_host, |
1001 const IPC::Message& message); | 1002 const IPC::Message& message); |
1002 #endif // defined(ENABLE_PLUGINS) | 1003 #endif // BUILDFLAG(ENABLE_PLUGINS) |
1003 void OnUpdateFaviconURL(const std::vector<FaviconURL>& candidates); | 1004 void OnUpdateFaviconURL(const std::vector<FaviconURL>& candidates); |
1004 void OnFirstVisuallyNonEmptyPaint(); | 1005 void OnFirstVisuallyNonEmptyPaint(); |
1005 void OnShowValidationMessage(const gfx::Rect& anchor_in_root_view, | 1006 void OnShowValidationMessage(const gfx::Rect& anchor_in_root_view, |
1006 const base::string16& main_text, | 1007 const base::string16& main_text, |
1007 const base::string16& sub_text); | 1008 const base::string16& sub_text); |
1008 void OnHideValidationMessage(); | 1009 void OnHideValidationMessage(); |
1009 void OnMoveValidationMessage(const gfx::Rect& anchor_in_root_view); | 1010 void OnMoveValidationMessage(const gfx::Rect& anchor_in_root_view); |
1010 | 1011 |
1011 // Called by derived classes to indicate that we're no longer waiting for a | 1012 // Called by derived classes to indicate that we're no longer waiting for a |
1012 // response. This won't actually update the throbber, but it will get picked | 1013 // response. This won't actually update the throbber, but it will get picked |
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1356 | 1357 |
1357 std::unique_ptr<ColorChooserInfo> color_chooser_info_; | 1358 std::unique_ptr<ColorChooserInfo> color_chooser_info_; |
1358 | 1359 |
1359 // Manages the embedder state for browser plugins, if this WebContents is an | 1360 // Manages the embedder state for browser plugins, if this WebContents is an |
1360 // embedder; NULL otherwise. | 1361 // embedder; NULL otherwise. |
1361 std::unique_ptr<BrowserPluginEmbedder> browser_plugin_embedder_; | 1362 std::unique_ptr<BrowserPluginEmbedder> browser_plugin_embedder_; |
1362 // Manages the guest state for browser plugin, if this WebContents is a guest; | 1363 // Manages the guest state for browser plugin, if this WebContents is a guest; |
1363 // NULL otherwise. | 1364 // NULL otherwise. |
1364 std::unique_ptr<BrowserPluginGuest> browser_plugin_guest_; | 1365 std::unique_ptr<BrowserPluginGuest> browser_plugin_guest_; |
1365 | 1366 |
1366 #if defined(ENABLE_PLUGINS) | 1367 #if BUILDFLAG(ENABLE_PLUGINS) |
1367 // Manages the whitelist of plugin content origins exempt from power saving. | 1368 // Manages the whitelist of plugin content origins exempt from power saving. |
1368 std::unique_ptr<PluginContentOriginWhitelist> | 1369 std::unique_ptr<PluginContentOriginWhitelist> |
1369 plugin_content_origin_whitelist_; | 1370 plugin_content_origin_whitelist_; |
1370 #endif | 1371 #endif |
1371 | 1372 |
1372 // This must be at the end, or else we might get notifications and use other | 1373 // This must be at the end, or else we might get notifications and use other |
1373 // member variables that are gone. | 1374 // member variables that are gone. |
1374 NotificationRegistrar registrar_; | 1375 NotificationRegistrar registrar_; |
1375 | 1376 |
1376 // Used during IPC message dispatching from the RenderView/RenderFrame so that | 1377 // Used during IPC message dispatching from the RenderView/RenderFrame so that |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1433 size_t bluetooth_connected_device_count_; | 1434 size_t bluetooth_connected_device_count_; |
1434 | 1435 |
1435 bool virtual_keyboard_requested_; | 1436 bool virtual_keyboard_requested_; |
1436 | 1437 |
1437 // Notifies ResourceDispatcherHostImpl of various events related to loading. | 1438 // Notifies ResourceDispatcherHostImpl of various events related to loading. |
1438 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; | 1439 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; |
1439 | 1440 |
1440 // Manages media players, CDMs, and power save blockers for media. | 1441 // Manages media players, CDMs, and power save blockers for media. |
1441 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1442 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
1442 | 1443 |
1443 #if defined(ENABLE_PLUGINS) | 1444 #if BUILDFLAG(ENABLE_PLUGINS) |
1444 // Observes pepper playback changes, and notifies MediaSession. | 1445 // Observes pepper playback changes, and notifies MediaSession. |
1445 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_; | 1446 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_; |
1446 #endif // defined(ENABLE_PLUGINS) | 1447 #endif // BUILDFLAG(ENABLE_PLUGINS) |
1447 | 1448 |
1448 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_; | 1449 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_; |
1449 | 1450 |
1450 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1451 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
1451 | 1452 |
1452 PageImportanceSignals page_importance_signals_; | 1453 PageImportanceSignals page_importance_signals_; |
1453 | 1454 |
1454 bool page_scale_factor_is_one_; | 1455 bool page_scale_factor_is_one_; |
1455 | 1456 |
1456 // TextInputManager tracks the IME-related state for all the | 1457 // TextInputManager tracks the IME-related state for all the |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1493 // Adds/removes a callback called on creation of each new WebContents. | 1494 // Adds/removes a callback called on creation of each new WebContents. |
1494 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1495 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
1495 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1496 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
1496 | 1497 |
1497 DISALLOW_COPY_AND_ASSIGN(FriendZone); | 1498 DISALLOW_COPY_AND_ASSIGN(FriendZone); |
1498 }; | 1499 }; |
1499 | 1500 |
1500 } // namespace content | 1501 } // namespace content |
1501 | 1502 |
1502 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1503 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
OLD | NEW |