| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 61 | 61 |
| 62 namespace service_manager { | 62 namespace service_manager { |
| 63 class InterfaceProvider; | 63 class InterfaceProvider; |
| 64 } | 64 } |
| 65 | 65 |
| 66 namespace content { | 66 namespace content { |
| 67 class BrowserPluginEmbedder; | 67 class BrowserPluginEmbedder; |
| 68 class BrowserPluginGuest; | 68 class BrowserPluginGuest; |
| 69 class DateTimeChooserAndroid; | 69 class DateTimeChooserAndroid; |
| 70 class FindRequestManager; | 70 class FindRequestManager; |
| 71 class HostZoomMapObserver; | |
| 72 class InterstitialPageImpl; | 71 class InterstitialPageImpl; |
| 73 class JavaScriptDialogManager; | 72 class JavaScriptDialogManager; |
| 74 class LoaderIOThreadNotifier; | 73 class LoaderIOThreadNotifier; |
| 75 class ManifestManagerHost; | 74 class ManifestManagerHost; |
| 76 class MediaWebContentsObserver; | 75 class MediaWebContentsObserver; |
| 77 class PluginContentOriginWhitelist; | 76 class PluginContentOriginWhitelist; |
| 78 class RenderViewHost; | 77 class RenderViewHost; |
| 79 class RenderViewHostDelegateView; | 78 class RenderViewHostDelegateView; |
| 80 class RenderWidgetHostImpl; | 79 class RenderWidgetHostImpl; |
| 81 class RenderWidgetHostInputEventRouter; | 80 class RenderWidgetHostInputEventRouter; |
| (...skipping 14 matching lines...) Expand all Loading... |
| 96 struct MHTMLGenerationParams; | 95 struct MHTMLGenerationParams; |
| 97 struct ResourceRedirectDetails; | 96 struct ResourceRedirectDetails; |
| 98 struct ResourceRequestDetails; | 97 struct ResourceRequestDetails; |
| 99 | 98 |
| 100 namespace mojom { | 99 namespace mojom { |
| 101 class CreateNewWindowParams; | 100 class CreateNewWindowParams; |
| 102 } | 101 } |
| 103 | 102 |
| 104 #if defined(OS_ANDROID) | 103 #if defined(OS_ANDROID) |
| 105 class WebContentsAndroid; | 104 class WebContentsAndroid; |
| 106 #endif | 105 #else // !defined(OS_ANDROID) |
| 106 class HostZoomMapObserver; |
| 107 #endif // defined(OS_ANDROID) |
| 107 | 108 |
| 108 #if BUILDFLAG(ENABLE_PLUGINS) | 109 #if BUILDFLAG(ENABLE_PLUGINS) |
| 109 class PepperPlaybackObserver; | 110 class PepperPlaybackObserver; |
| 110 #endif | 111 #endif |
| 111 | 112 |
| 112 // Factory function for the implementations that content knows about. Takes | 113 // Factory function for the implementations that content knows about. Takes |
| 113 // ownership of |delegate|. | 114 // ownership of |delegate|. |
| 114 WebContentsView* CreateWebContentsView( | 115 WebContentsView* CreateWebContentsView( |
| 115 WebContentsImpl* web_contents, | 116 WebContentsImpl* web_contents, |
| 116 WebContentsViewDelegate* delegate, | 117 WebContentsViewDelegate* delegate, |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 void WasOccluded(); | 236 void WasOccluded(); |
| 236 void WasUnOccluded(); | 237 void WasUnOccluded(); |
| 237 | 238 |
| 238 // Broadcasts the mode change to all frames. | 239 // Broadcasts the mode change to all frames. |
| 239 void SetAccessibilityMode(AccessibilityMode mode); | 240 void SetAccessibilityMode(AccessibilityMode mode); |
| 240 | 241 |
| 241 // Adds the given accessibility mode to the current accessibility mode | 242 // Adds the given accessibility mode to the current accessibility mode |
| 242 // bitmap. | 243 // bitmap. |
| 243 void AddAccessibilityMode(AccessibilityMode mode); | 244 void AddAccessibilityMode(AccessibilityMode mode); |
| 244 | 245 |
| 246 #if !defined(OS_ANDROID) |
| 245 // Set a temporary zoom level for the frames associated with this WebContents. | 247 // Set a temporary zoom level for the frames associated with this WebContents. |
| 246 // If |is_temporary| is true, we are setting a new temporary zoom level, | 248 // If |is_temporary| is true, we are setting a new temporary zoom level, |
| 247 // otherwise we are clearing a previously set temporary zoom level. | 249 // otherwise we are clearing a previously set temporary zoom level. |
| 248 void SetTemporaryZoomLevel(double level, bool temporary_zoom_enabled); | 250 void SetTemporaryZoomLevel(double level, bool temporary_zoom_enabled); |
| 249 | 251 |
| 250 // Sets the zoom level for frames associated with this WebContents. | 252 // Sets the zoom level for frames associated with this WebContents. |
| 251 void UpdateZoom(double level); | 253 void UpdateZoom(double level); |
| 252 | 254 |
| 253 // Sets the zoom level for frames associated with this WebContents if it | 255 // Sets the zoom level for frames associated with this WebContents if it |
| 254 // matches |host| and (if non-empty) |scheme|. Matching is done on the | 256 // matches |host| and (if non-empty) |scheme|. Matching is done on the |
| 255 // last committed entry. | 257 // last committed entry. |
| 256 void UpdateZoomIfNecessary(const std::string& scheme, | 258 void UpdateZoomIfNecessary(const std::string& scheme, |
| 257 const std::string& host, | 259 const std::string& host, |
| 258 double level); | 260 double level); |
| 261 #endif // !defined(OS_ANDROID) |
| 259 | 262 |
| 260 // Adds a new binding set to the WebContents. Returns a closure which may be | 263 // Adds a new binding set to the WebContents. Returns a closure which may be |
| 261 // used to remove the binding set at any time. The closure is safe to call | 264 // used to remove the binding set at any time. The closure is safe to call |
| 262 // even after WebContents destruction. | 265 // even after WebContents destruction. |
| 263 // | 266 // |
| 264 // |binding_set| is not owned and must either outlive this WebContents or be | 267 // |binding_set| is not owned and must either outlive this WebContents or be |
| 265 // explicitly removed before being destroyed. | 268 // explicitly removed before being destroyed. |
| 266 base::Closure AddBindingSet(const std::string& interface_name, | 269 base::Closure AddBindingSet(const std::string& interface_name, |
| 267 WebContentsBindingSet* binding_set); | 270 WebContentsBindingSet* binding_set); |
| 268 | 271 |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 599 void ShowCreatedFullscreenWidget(int process_id, int route_id) override; | 602 void ShowCreatedFullscreenWidget(int process_id, int route_id) override; |
| 600 void RequestMediaAccessPermission( | 603 void RequestMediaAccessPermission( |
| 601 const MediaStreamRequest& request, | 604 const MediaStreamRequest& request, |
| 602 const MediaResponseCallback& callback) override; | 605 const MediaResponseCallback& callback) override; |
| 603 bool CheckMediaAccessPermission(const GURL& security_origin, | 606 bool CheckMediaAccessPermission(const GURL& security_origin, |
| 604 MediaStreamType type) override; | 607 MediaStreamType type) override; |
| 605 std::string GetDefaultMediaDeviceID(MediaStreamType type) override; | 608 std::string GetDefaultMediaDeviceID(MediaStreamType type) override; |
| 606 SessionStorageNamespace* GetSessionStorageNamespace( | 609 SessionStorageNamespace* GetSessionStorageNamespace( |
| 607 SiteInstance* instance) override; | 610 SiteInstance* instance) override; |
| 608 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; | 611 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; |
| 612 #if !defined(OS_ANDROID) |
| 609 double GetPendingPageZoomLevel() override; | 613 double GetPendingPageZoomLevel() override; |
| 614 #endif // !defined(OS_ANDROID) |
| 610 FrameTree* GetFrameTree() override; | 615 FrameTree* GetFrameTree() override; |
| 611 void SetIsVirtualKeyboardRequested(bool requested) override; | 616 void SetIsVirtualKeyboardRequested(bool requested) override; |
| 612 bool IsVirtualKeyboardRequested() override; | 617 bool IsVirtualKeyboardRequested() override; |
| 613 bool IsOverridingUserAgent() override; | 618 bool IsOverridingUserAgent() override; |
| 614 bool IsJavaScriptDialogShowing() const override; | 619 bool IsJavaScriptDialogShowing() const override; |
| 615 bool ShouldIgnoreUnresponsiveRenderer() override; | 620 bool ShouldIgnoreUnresponsiveRenderer() override; |
| 616 bool HideDownloadUI() const override; | 621 bool HideDownloadUI() const override; |
| 617 bool HasPersistentVideo() const override; | 622 bool HasPersistentVideo() const override; |
| 618 | 623 |
| 619 // NavigatorDelegate --------------------------------------------------------- | 624 // NavigatorDelegate --------------------------------------------------------- |
| (...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1553 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; | 1558 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; |
| 1554 | 1559 |
| 1555 // Manages media players, CDMs, and power save blockers for media. | 1560 // Manages media players, CDMs, and power save blockers for media. |
| 1556 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; | 1561 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; |
| 1557 | 1562 |
| 1558 #if BUILDFLAG(ENABLE_PLUGINS) | 1563 #if BUILDFLAG(ENABLE_PLUGINS) |
| 1559 // Observes pepper playback changes, and notifies MediaSession. | 1564 // Observes pepper playback changes, and notifies MediaSession. |
| 1560 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_; | 1565 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_; |
| 1561 #endif // BUILDFLAG(ENABLE_PLUGINS) | 1566 #endif // BUILDFLAG(ENABLE_PLUGINS) |
| 1562 | 1567 |
| 1568 #if !defined(OS_ANDROID) |
| 1563 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_; | 1569 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_; |
| 1570 #endif // !defined(OS_ANDROID) |
| 1564 | 1571 |
| 1565 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; | 1572 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; |
| 1566 | 1573 |
| 1567 PageImportanceSignals page_importance_signals_; | 1574 PageImportanceSignals page_importance_signals_; |
| 1568 | 1575 |
| 1576 #if !defined(OS_ANDROID) |
| 1569 bool page_scale_factor_is_one_; | 1577 bool page_scale_factor_is_one_; |
| 1578 #endif // !defined(OS_ANDROID) |
| 1570 | 1579 |
| 1571 // TextInputManager tracks the IME-related state for all the | 1580 // TextInputManager tracks the IME-related state for all the |
| 1572 // RenderWidgetHostViews on this WebContents. Only exists on the outermost | 1581 // RenderWidgetHostViews on this WebContents. Only exists on the outermost |
| 1573 // WebContents and is automatically destroyed when a WebContents becomes an | 1582 // WebContents and is automatically destroyed when a WebContents becomes an |
| 1574 // inner WebContents by attaching to an outer WebContents. Then the | 1583 // inner WebContents by attaching to an outer WebContents. Then the |
| 1575 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked | 1584 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked |
| 1576 // by the TextInputManager in the outer WebContents. | 1585 // by the TextInputManager in the outer WebContents. |
| 1577 std::unique_ptr<TextInputManager> text_input_manager_; | 1586 std::unique_ptr<TextInputManager> text_input_manager_; |
| 1578 | 1587 |
| 1579 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if | 1588 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if |
| (...skipping 30 matching lines...) Expand all Loading... |
| 1610 // Adds/removes a callback called on creation of each new WebContents. | 1619 // Adds/removes a callback called on creation of each new WebContents. |
| 1611 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); | 1620 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1612 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); | 1621 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); |
| 1613 | 1622 |
| 1614 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); | 1623 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); |
| 1615 }; | 1624 }; |
| 1616 | 1625 |
| 1617 } // namespace content | 1626 } // namespace content |
| 1618 | 1627 |
| 1619 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ | 1628 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ |
| OLD | NEW |