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

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

Issue 1804023002: Fix page zoom to be frame-centric for out-of-process frames. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments, exclude part of test since not supported on Android. Created 4 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 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 // have been removed. 218 // have been removed.
219 void RemoveAccessibilityMode(AccessibilityMode mode); 219 void RemoveAccessibilityMode(AccessibilityMode mode);
220 220
221 // Request a one-time snapshot of the accessibility tree without changing 221 // Request a one-time snapshot of the accessibility tree without changing
222 // the accessibility mode. 222 // the accessibility mode.
223 using AXTreeSnapshotCallback = 223 using AXTreeSnapshotCallback =
224 base::Callback<void( 224 base::Callback<void(
225 const ui::AXTreeUpdate&)>; 225 const ui::AXTreeUpdate&)>;
226 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); 226 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
227 227
228 // Set a temporary zoom level for the frames associated with this WebContents.
229 // If |is_temporary| is true, we are setting a new temporary zoom level,
230 // otherwise we are clearing a previously set temporary zoom level.
231 void SetTemporaryZoomLevel(double level, bool temporary_zoom_enabled);
232
233 // Sets the zoom level for frames associated with this WebContents.
234 void UpdateZoom(double level);
235
236 // Sets the zoom level for frames associated with this WebContents if it
237 // matches |host| and (if non-empty) |scheme|. Matching is done on the
238 // last committed entry.
239 void UpdateZoomIfNecessary(const std::string& scheme,
240 const std::string& host,
241 double level);
242
228 // WebContents ------------------------------------------------------ 243 // WebContents ------------------------------------------------------
229 WebContentsDelegate* GetDelegate() override; 244 WebContentsDelegate* GetDelegate() override;
230 void SetDelegate(WebContentsDelegate* delegate) override; 245 void SetDelegate(WebContentsDelegate* delegate) override;
231 NavigationControllerImpl& GetController() override; 246 NavigationControllerImpl& GetController() override;
232 const NavigationControllerImpl& GetController() const override; 247 const NavigationControllerImpl& GetController() const override;
233 BrowserContext* GetBrowserContext() const override; 248 BrowserContext* GetBrowserContext() const override;
234 const GURL& GetURL() const override; 249 const GURL& GetURL() const override;
235 const GURL& GetVisibleURL() const override; 250 const GURL& GetVisibleURL() const override;
236 const GURL& GetLastCommittedURL() const override; 251 const GURL& GetLastCommittedURL() const override;
237 RenderProcessHost* GetRenderProcessHost() const override; 252 RenderProcessHost* GetRenderProcessHost() const override;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
511 const MediaResponseCallback& callback) override; 526 const MediaResponseCallback& callback) override;
512 bool CheckMediaAccessPermission(const GURL& security_origin, 527 bool CheckMediaAccessPermission(const GURL& security_origin,
513 MediaStreamType type) override; 528 MediaStreamType type) override;
514 SessionStorageNamespace* GetSessionStorageNamespace( 529 SessionStorageNamespace* GetSessionStorageNamespace(
515 SiteInstance* instance) override; 530 SiteInstance* instance) override;
516 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override; 531 SessionStorageNamespaceMap GetSessionStorageNamespaceMap() override;
517 FrameTree* GetFrameTree() override; 532 FrameTree* GetFrameTree() override;
518 void SetIsVirtualKeyboardRequested(bool requested) override; 533 void SetIsVirtualKeyboardRequested(bool requested) override;
519 bool IsVirtualKeyboardRequested() override; 534 bool IsVirtualKeyboardRequested() override;
520 bool IsOverridingUserAgent() override; 535 bool IsOverridingUserAgent() override;
536 double GetPendingPageZoomLevel() override;
521 537
522 // NavigatorDelegate --------------------------------------------------------- 538 // NavigatorDelegate ---------------------------------------------------------
523 539
524 void DidStartNavigation(NavigationHandle* navigation_handle) override; 540 void DidStartNavigation(NavigationHandle* navigation_handle) override;
525 void DidRedirectNavigation(NavigationHandle* navigation_handle) override; 541 void DidRedirectNavigation(NavigationHandle* navigation_handle) override;
526 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override; 542 void ReadyToCommitNavigation(NavigationHandle* navigation_handle) override;
527 void DidFinishNavigation(NavigationHandle* navigation_handle) override; 543 void DidFinishNavigation(NavigationHandle* navigation_handle) override;
528 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host, 544 void DidStartProvisionalLoad(RenderFrameHostImpl* render_frame_host,
529 const GURL& validated_url, 545 const GURL& validated_url,
530 bool is_error_page, 546 bool is_error_page,
(...skipping 854 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 // Adds/removes a callback called on creation of each new WebContents. 1401 // Adds/removes a callback called on creation of each new WebContents.
1386 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1402 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1387 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1403 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1388 1404
1389 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1405 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1390 }; 1406 };
1391 1407
1392 } // namespace content 1408 } // namespace content
1393 1409
1394 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1410 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698