Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(687)

Side by Side Diff: content/browser/web_contents/web_contents_impl.h

Issue 2874833002: Don't compile code for desktop zoom or GuestViews on mobile platforms. (Closed)
Patch Set: Update CastBrowserContext Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 namespace service_manager { 58 namespace service_manager {
59 class InterfaceProvider; 59 class InterfaceProvider;
60 } 60 }
61 61
62 namespace content { 62 namespace content {
63 class BrowserPluginEmbedder; 63 class BrowserPluginEmbedder;
64 class BrowserPluginGuest; 64 class BrowserPluginGuest;
65 class DateTimeChooserAndroid; 65 class DateTimeChooserAndroid;
66 class FindRequestManager; 66 class FindRequestManager;
67 class HostZoomMapObserver;
68 class InterstitialPageImpl; 67 class InterstitialPageImpl;
69 class JavaScriptDialogManager; 68 class JavaScriptDialogManager;
70 class LoaderIOThreadNotifier; 69 class LoaderIOThreadNotifier;
71 class ManifestManagerHost; 70 class ManifestManagerHost;
72 class MediaWebContentsObserver; 71 class MediaWebContentsObserver;
73 class PluginContentOriginWhitelist; 72 class PluginContentOriginWhitelist;
74 class RenderViewHost; 73 class RenderViewHost;
75 class RenderViewHostDelegateView; 74 class RenderViewHostDelegateView;
76 class RenderWidgetHostImpl; 75 class RenderWidgetHostImpl;
77 class RenderWidgetHostInputEventRouter; 76 class RenderWidgetHostInputEventRouter;
(...skipping 14 matching lines...) Expand all
92 struct MHTMLGenerationParams; 91 struct MHTMLGenerationParams;
93 struct ResourceRedirectDetails; 92 struct ResourceRedirectDetails;
94 struct ResourceRequestDetails; 93 struct ResourceRequestDetails;
95 94
96 namespace mojom { 95 namespace mojom {
97 class CreateNewWindowParams; 96 class CreateNewWindowParams;
98 } 97 }
99 98
100 #if defined(OS_ANDROID) 99 #if defined(OS_ANDROID)
101 class WebContentsAndroid; 100 class WebContentsAndroid;
102 #endif 101 #else // defined(OS_ANDROID)
102 class HostZoomMapObserver;
103 #endif // defined(OS_ANDROID)
103 104
104 #if BUILDFLAG(ENABLE_PLUGINS) 105 #if BUILDFLAG(ENABLE_PLUGINS)
105 class PepperPlaybackObserver; 106 class PepperPlaybackObserver;
106 #endif 107 #endif
107 108
108 // Factory function for the implementations that content knows about. Takes 109 // Factory function for the implementations that content knows about. Takes
109 // ownership of |delegate|. 110 // ownership of |delegate|.
110 WebContentsView* CreateWebContentsView( 111 WebContentsView* CreateWebContentsView(
111 WebContentsImpl* web_contents, 112 WebContentsImpl* web_contents,
112 WebContentsViewDelegate* delegate, 113 WebContentsViewDelegate* delegate,
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 void WasOccluded(); 229 void WasOccluded();
229 void WasUnOccluded(); 230 void WasUnOccluded();
230 231
231 // Broadcasts the mode change to all frames. 232 // Broadcasts the mode change to all frames.
232 void SetAccessibilityMode(AccessibilityMode mode); 233 void SetAccessibilityMode(AccessibilityMode mode);
233 234
234 // Adds the given accessibility mode to the current accessibility mode 235 // Adds the given accessibility mode to the current accessibility mode
235 // bitmap. 236 // bitmap.
236 void AddAccessibilityMode(AccessibilityMode mode); 237 void AddAccessibilityMode(AccessibilityMode mode);
237 238
239 #if !defined(OS_ANDROID)
238 // Set a temporary zoom level for the frames associated with this WebContents. 240 // Set a temporary zoom level for the frames associated with this WebContents.
239 // If |is_temporary| is true, we are setting a new temporary zoom level, 241 // If |is_temporary| is true, we are setting a new temporary zoom level,
240 // otherwise we are clearing a previously set temporary zoom level. 242 // otherwise we are clearing a previously set temporary zoom level.
241 void SetTemporaryZoomLevel(double level, bool temporary_zoom_enabled); 243 void SetTemporaryZoomLevel(double level, bool temporary_zoom_enabled);
242 244
243 // Sets the zoom level for frames associated with this WebContents. 245 // Sets the zoom level for frames associated with this WebContents.
244 void UpdateZoom(double level); 246 void UpdateZoom(double level);
245 247
246 // Sets the zoom level for frames associated with this WebContents if it 248 // Sets the zoom level for frames associated with this WebContents if it
247 // matches |host| and (if non-empty) |scheme|. Matching is done on the 249 // matches |host| and (if non-empty) |scheme|. Matching is done on the
248 // last committed entry. 250 // last committed entry.
249 void UpdateZoomIfNecessary(const std::string& scheme, 251 void UpdateZoomIfNecessary(const std::string& scheme,
250 const std::string& host, 252 const std::string& host,
251 double level); 253 double level);
254 #endif // !defined(OS_ANDROID)
252 255
253 // Adds a new binding set to the WebContents. Returns a closure which may be 256 // Adds a new binding set to the WebContents. Returns a closure which may be
254 // used to remove the binding set at any time. The closure is safe to call 257 // used to remove the binding set at any time. The closure is safe to call
255 // even after WebContents destruction. 258 // even after WebContents destruction.
256 // 259 //
257 // |binding_set| is not owned and must either outlive this WebContents or be 260 // |binding_set| is not owned and must either outlive this WebContents or be
258 // explicitly removed before being destroyed. 261 // explicitly removed before being destroyed.
259 base::Closure AddBindingSet(const std::string& interface_name, 262 base::Closure AddBindingSet(const std::string& interface_name,
260 WebContentsBindingSet* binding_set); 263 WebContentsBindingSet* binding_set);
261 264
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 void ShowCreatedFullscreenWidget(int process_id, int route_id) override; 589 void ShowCreatedFullscreenWidget(int process_id, int route_id) override;
587 void RequestMediaAccessPermission( 590 void RequestMediaAccessPermission(
588 const MediaStreamRequest& request, 591 const MediaStreamRequest& request,
589 const MediaResponseCallback& callback) override; 592 const MediaResponseCallback& callback) override;
590 bool CheckMediaAccessPermission(const GURL& security_origin, 593 bool CheckMediaAccessPermission(const GURL& security_origin,
591 MediaStreamType type) override; 594 MediaStreamType type) override;
592 std::string GetDefaultMediaDeviceID(MediaStreamType type) override; 595 std::string GetDefaultMediaDeviceID(MediaStreamType type) override;
593 SessionStorageNamespace* GetSessionStorageNamespace( 596 SessionStorageNamespace* GetSessionStorageNamespace(
594 SiteInstance* instance) override; 597 SiteInstance* instance) override;
595 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; 598 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override;
599 #if !defined(OS_ANDROID)
596 double GetPendingPageZoomLevel() override; 600 double GetPendingPageZoomLevel() override;
601 #endif // !defined(OS_ANDROID)
597 FrameTree* GetFrameTree() override; 602 FrameTree* GetFrameTree() override;
598 void SetIsVirtualKeyboardRequested(bool requested) override; 603 void SetIsVirtualKeyboardRequested(bool requested) override;
599 bool IsVirtualKeyboardRequested() override; 604 bool IsVirtualKeyboardRequested() override;
600 bool IsOverridingUserAgent() override; 605 bool IsOverridingUserAgent() override;
601 bool IsJavaScriptDialogShowing() const override; 606 bool IsJavaScriptDialogShowing() const override;
602 bool ShouldIgnoreUnresponsiveRenderer() override; 607 bool ShouldIgnoreUnresponsiveRenderer() override;
603 bool HideDownloadUI() const override; 608 bool HideDownloadUI() const override;
604 bool HasPersistentVideo() const override; 609 bool HasPersistentVideo() const override;
605 610
606 // NavigatorDelegate --------------------------------------------------------- 611 // NavigatorDelegate ---------------------------------------------------------
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
1533 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_; 1538 std::unique_ptr<LoaderIOThreadNotifier> loader_io_thread_notifier_;
1534 1539
1535 // Manages media players, CDMs, and power save blockers for media. 1540 // Manages media players, CDMs, and power save blockers for media.
1536 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_; 1541 std::unique_ptr<MediaWebContentsObserver> media_web_contents_observer_;
1537 1542
1538 #if BUILDFLAG(ENABLE_PLUGINS) 1543 #if BUILDFLAG(ENABLE_PLUGINS)
1539 // Observes pepper playback changes, and notifies MediaSession. 1544 // Observes pepper playback changes, and notifies MediaSession.
1540 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_; 1545 std::unique_ptr<PepperPlaybackObserver> pepper_playback_observer_;
1541 #endif // BUILDFLAG(ENABLE_PLUGINS) 1546 #endif // BUILDFLAG(ENABLE_PLUGINS)
1542 1547
1548 #if !defined(OS_ANDROID)
1543 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_; 1549 std::unique_ptr<HostZoomMapObserver> host_zoom_map_observer_;
1550 #endif // !defined(OS_ANDROID)
1544 1551
1545 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_; 1552 std::unique_ptr<RenderWidgetHostInputEventRouter> rwh_input_event_router_;
1546 1553
1547 PageImportanceSignals page_importance_signals_; 1554 PageImportanceSignals page_importance_signals_;
1548 1555
1556 #if !defined(OS_ANDROID)
1549 bool page_scale_factor_is_one_; 1557 bool page_scale_factor_is_one_;
1558 #endif // !defined(OS_ANDROID)
1550 1559
1551 // TextInputManager tracks the IME-related state for all the 1560 // TextInputManager tracks the IME-related state for all the
1552 // RenderWidgetHostViews on this WebContents. Only exists on the outermost 1561 // RenderWidgetHostViews on this WebContents. Only exists on the outermost
1553 // WebContents and is automatically destroyed when a WebContents becomes an 1562 // WebContents and is automatically destroyed when a WebContents becomes an
1554 // inner WebContents by attaching to an outer WebContents. Then the 1563 // inner WebContents by attaching to an outer WebContents. Then the
1555 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked 1564 // IME-related state for RenderWidgetHosts on the inner WebContents is tracked
1556 // by the TextInputManager in the outer WebContents. 1565 // by the TextInputManager in the outer WebContents.
1557 std::unique_ptr<TextInputManager> text_input_manager_; 1566 std::unique_ptr<TextInputManager> text_input_manager_;
1558 1567
1559 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if 1568 // Stores the RenderWidgetHost that currently holds a mouse lock or nullptr if
(...skipping 30 matching lines...) Expand all
1590 // Adds/removes a callback called on creation of each new WebContents. 1599 // Adds/removes a callback called on creation of each new WebContents.
1591 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1600 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1592 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1601 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1593 1602
1594 DISALLOW_COPY_AND_ASSIGN(FriendWrapper); 1603 DISALLOW_COPY_AND_ASSIGN(FriendWrapper);
1595 }; 1604 };
1596 1605
1597 } // namespace content 1606 } // namespace content
1598 1607
1599 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1608 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698