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

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 alexmos@ comments Created 4 years, 8 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 // have been removed. 217 // have been removed.
218 void RemoveAccessibilityMode(AccessibilityMode mode); 218 void RemoveAccessibilityMode(AccessibilityMode mode);
219 219
220 // Request a one-time snapshot of the accessibility tree without changing 220 // Request a one-time snapshot of the accessibility tree without changing
221 // the accessibility mode. 221 // the accessibility mode.
222 using AXTreeSnapshotCallback = 222 using AXTreeSnapshotCallback =
223 base::Callback<void( 223 base::Callback<void(
224 const ui::AXTreeUpdate&)>; 224 const ui::AXTreeUpdate&)>;
225 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback); 225 void RequestAXTreeSnapshot(AXTreeSnapshotCallback callback);
226 226
227 // Set a temporary zoom level for the frames associated with this WebContents.
228 // If |is_temporary| is true, we are setting a new temporary zoom level,
229 // otherwise we are clearing a previously set temporary zoom level.
230 void SetTemporaryZoomLevel(double level, bool is_temporary);
231
232 // Sets the zoom level for frames associated with this WebContents.
233 void UpdateZoom(double level);
234
235 // Sets the zoom level for frames associated with this WebContents if it
236 // matches |host| and (if non-empty) |scheme|. Matching is done on the
237 // last committed entry.
238 void UpdateZoomIfNecessary(const std::string& scheme,
239 const std::string& host,
240 double level);
241
227 // WebContents ------------------------------------------------------ 242 // WebContents ------------------------------------------------------
228 WebContentsDelegate* GetDelegate() override; 243 WebContentsDelegate* GetDelegate() override;
229 void SetDelegate(WebContentsDelegate* delegate) override; 244 void SetDelegate(WebContentsDelegate* delegate) override;
230 NavigationControllerImpl& GetController() override; 245 NavigationControllerImpl& GetController() override;
231 const NavigationControllerImpl& GetController() const override; 246 const NavigationControllerImpl& GetController() const override;
232 BrowserContext* GetBrowserContext() const override; 247 BrowserContext* GetBrowserContext() const override;
233 const GURL& GetURL() const override; 248 const GURL& GetURL() const override;
234 const GURL& GetVisibleURL() const override; 249 const GURL& GetVisibleURL() const override;
235 const GURL& GetLastCommittedURL() const override; 250 const GURL& GetLastCommittedURL() const override;
236 RenderProcessHost* GetRenderProcessHost() const override; 251 RenderProcessHost* GetRenderProcessHost() const override;
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
419 void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) override; 434 void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) override;
420 void UpdateStateForFrame(RenderFrameHost* render_frame_host, 435 void UpdateStateForFrame(RenderFrameHost* render_frame_host,
421 const PageState& page_state) override; 436 const PageState& page_state) override;
422 void UpdateTitle(RenderFrameHost* render_frame_host, 437 void UpdateTitle(RenderFrameHost* render_frame_host,
423 int32_t page_id, 438 int32_t page_id,
424 const base::string16& title, 439 const base::string16& title,
425 base::i18n::TextDirection title_direction) override; 440 base::i18n::TextDirection title_direction) override;
426 void UpdateEncoding(RenderFrameHost* render_frame_host, 441 void UpdateEncoding(RenderFrameHost* render_frame_host,
427 const std::string& encoding) override; 442 const std::string& encoding) override;
428 WebContents* GetAsWebContents() override; 443 WebContents* GetAsWebContents() override;
444 double PageZoomLevel() override;
alexmos 2016/04/11 23:19:10 nit: put in the RenderViewHostDelegate section. C
wjmaclean 2016/04/13 18:47:47 Done.
429 bool IsNeverVisible() override; 445 bool IsNeverVisible() override;
430 AccessibilityMode GetAccessibilityMode() const override; 446 AccessibilityMode GetAccessibilityMode() const override;
431 void AccessibilityEventReceived( 447 void AccessibilityEventReceived(
432 const std::vector<AXEventNotificationDetails>& details) override; 448 const std::vector<AXEventNotificationDetails>& details) override;
433 RenderFrameHost* GetGuestByInstanceID( 449 RenderFrameHost* GetGuestByInstanceID(
434 RenderFrameHost* render_frame_host, 450 RenderFrameHost* render_frame_host,
435 int browser_plugin_instance_id) override; 451 int browser_plugin_instance_id) override;
436 GeolocationServiceContext* GetGeolocationServiceContext() override; 452 GeolocationServiceContext* GetGeolocationServiceContext() override;
437 WakeLockServiceContext* GetWakeLockServiceContext() override; 453 WakeLockServiceContext* GetWakeLockServiceContext() override;
438 void EnterFullscreenMode(const GURL& origin) override; 454 void EnterFullscreenMode(const GURL& origin) override;
(...skipping 904 matching lines...) Expand 10 before | Expand all | Expand 10 after
1343 // Adds/removes a callback called on creation of each new WebContents. 1359 // Adds/removes a callback called on creation of each new WebContents.
1344 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1360 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1345 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1361 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1346 1362
1347 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1363 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1348 }; 1364 };
1349 1365
1350 } // namespace content 1366 } // namespace content
1351 1367
1352 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1368 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698