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

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: Rebase to master@{#386187}. 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 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) override; 435 void DocumentOnLoadCompleted(RenderFrameHost* render_frame_host) override;
421 void UpdateStateForFrame(RenderFrameHost* render_frame_host, 436 void UpdateStateForFrame(RenderFrameHost* render_frame_host,
422 const PageState& page_state) override; 437 const PageState& page_state) override;
423 void UpdateTitle(RenderFrameHost* render_frame_host, 438 void UpdateTitle(RenderFrameHost* render_frame_host,
424 int32_t page_id, 439 int32_t page_id,
425 const base::string16& title, 440 const base::string16& title,
426 base::i18n::TextDirection title_direction) override; 441 base::i18n::TextDirection title_direction) override;
427 void UpdateEncoding(RenderFrameHost* render_frame_host, 442 void UpdateEncoding(RenderFrameHost* render_frame_host,
428 const std::string& encoding) override; 443 const std::string& encoding) override;
429 WebContents* GetAsWebContents() override; 444 WebContents* GetAsWebContents() override;
445 double PageZoomLevel() override;
430 bool IsNeverVisible() override; 446 bool IsNeverVisible() override;
431 AccessibilityMode GetAccessibilityMode() const override; 447 AccessibilityMode GetAccessibilityMode() const override;
432 void AccessibilityEventReceived( 448 void AccessibilityEventReceived(
433 const std::vector<AXEventNotificationDetails>& details) override; 449 const std::vector<AXEventNotificationDetails>& details) override;
434 RenderFrameHost* GetGuestByInstanceID( 450 RenderFrameHost* GetGuestByInstanceID(
435 RenderFrameHost* render_frame_host, 451 RenderFrameHost* render_frame_host,
436 int browser_plugin_instance_id) override; 452 int browser_plugin_instance_id) override;
437 GeolocationServiceContext* GetGeolocationServiceContext() override; 453 GeolocationServiceContext* GetGeolocationServiceContext() override;
438 WakeLockServiceContext* GetWakeLockServiceContext() override; 454 WakeLockServiceContext* GetWakeLockServiceContext() override;
439 void EnterFullscreenMode(const GURL& origin) override; 455 void EnterFullscreenMode(const GURL& origin) override;
(...skipping 916 matching lines...) Expand 10 before | Expand all | Expand 10 after
1356 // Adds/removes a callback called on creation of each new WebContents. 1372 // Adds/removes a callback called on creation of each new WebContents.
1357 static void AddCreatedCallbackForTesting(const CreatedCallback& callback); 1373 static void AddCreatedCallbackForTesting(const CreatedCallback& callback);
1358 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback); 1374 static void RemoveCreatedCallbackForTesting(const CreatedCallback& callback);
1359 1375
1360 DISALLOW_COPY_AND_ASSIGN(FriendZone); 1376 DISALLOW_COPY_AND_ASSIGN(FriendZone);
1361 }; 1377 };
1362 1378
1363 } // namespace content 1379 } // namespace content
1364 1380
1365 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_ 1381 #endif // CONTENT_BROWSER_WEB_CONTENTS_WEB_CONTENTS_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698