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

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

Issue 954923005: Make command-zero reset page scale in addition to zoom level (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase again again Created 5 years, 9 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
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "content/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 2435 matching lines...) Expand 10 before | Expand all | Expand 10 after
2446 } 2446 }
2447 2447
2448 int WebContentsImpl::GetMinimumZoomPercent() const { 2448 int WebContentsImpl::GetMinimumZoomPercent() const {
2449 return minimum_zoom_percent_; 2449 return minimum_zoom_percent_;
2450 } 2450 }
2451 2451
2452 int WebContentsImpl::GetMaximumZoomPercent() const { 2452 int WebContentsImpl::GetMaximumZoomPercent() const {
2453 return maximum_zoom_percent_; 2453 return maximum_zoom_percent_;
2454 } 2454 }
2455 2455
2456 void WebContentsImpl::ResetPageScale() {
2457 Send(new ViewMsg_ResetPageScale(GetRoutingID()));
2458 }
2459
2456 gfx::Size WebContentsImpl::GetPreferredSize() const { 2460 gfx::Size WebContentsImpl::GetPreferredSize() const {
2457 return capturer_count_ == 0 ? preferred_size_ : preferred_size_for_capture_; 2461 return capturer_count_ == 0 ? preferred_size_ : preferred_size_for_capture_;
2458 } 2462 }
2459 2463
2460 bool WebContentsImpl::GotResponseToLockMouseRequest(bool allowed) { 2464 bool WebContentsImpl::GotResponseToLockMouseRequest(bool allowed) {
2461 if (GetBrowserPluginGuest()) 2465 if (GetBrowserPluginGuest())
2462 return GetBrowserPluginGuest()->LockMouse(allowed); 2466 return GetBrowserPluginGuest()->LockMouse(allowed);
2463 2467
2464 return GetRenderViewHost() ? 2468 return GetRenderViewHost() ?
2465 GetRenderViewHostImpl()->GotResponseToLockMouseRequest(allowed) : false; 2469 GetRenderViewHostImpl()->GotResponseToLockMouseRequest(allowed) : false;
(...skipping 2090 matching lines...) Expand 10 before | Expand all | Expand 10 after
4556 node->render_manager()->ResumeResponseDeferredAtStart(); 4560 node->render_manager()->ResumeResponseDeferredAtStart();
4557 } 4561 }
4558 4562
4559 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4563 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4560 force_disable_overscroll_content_ = force_disable; 4564 force_disable_overscroll_content_ = force_disable;
4561 if (view_) 4565 if (view_)
4562 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4566 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4563 } 4567 }
4564 4568
4565 } // namespace content 4569 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/common/view_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698