OLD | NEW |
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 2409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2420 } | 2420 } |
2421 | 2421 |
2422 int WebContentsImpl::GetMinimumZoomPercent() const { | 2422 int WebContentsImpl::GetMinimumZoomPercent() const { |
2423 return minimum_zoom_percent_; | 2423 return minimum_zoom_percent_; |
2424 } | 2424 } |
2425 | 2425 |
2426 int WebContentsImpl::GetMaximumZoomPercent() const { | 2426 int WebContentsImpl::GetMaximumZoomPercent() const { |
2427 return maximum_zoom_percent_; | 2427 return maximum_zoom_percent_; |
2428 } | 2428 } |
2429 | 2429 |
| 2430 void WebContentsImpl::ResetPageScale() { |
| 2431 Send(new ViewMsg_ResetPageScale(GetRoutingID())); |
| 2432 } |
| 2433 |
2430 gfx::Size WebContentsImpl::GetPreferredSize() const { | 2434 gfx::Size WebContentsImpl::GetPreferredSize() const { |
2431 return capturer_count_ == 0 ? preferred_size_ : preferred_size_for_capture_; | 2435 return capturer_count_ == 0 ? preferred_size_ : preferred_size_for_capture_; |
2432 } | 2436 } |
2433 | 2437 |
2434 bool WebContentsImpl::GotResponseToLockMouseRequest(bool allowed) { | 2438 bool WebContentsImpl::GotResponseToLockMouseRequest(bool allowed) { |
2435 if (GetBrowserPluginGuest()) | 2439 if (GetBrowserPluginGuest()) |
2436 return GetBrowserPluginGuest()->LockMouse(allowed); | 2440 return GetBrowserPluginGuest()->LockMouse(allowed); |
2437 | 2441 |
2438 return GetRenderViewHost() ? | 2442 return GetRenderViewHost() ? |
2439 GetRenderViewHostImpl()->GotResponseToLockMouseRequest(allowed) : false; | 2443 GetRenderViewHostImpl()->GotResponseToLockMouseRequest(allowed) : false; |
(...skipping 2073 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4513 node->render_manager()->ResumeResponseDeferredAtStart(); | 4517 node->render_manager()->ResumeResponseDeferredAtStart(); |
4514 } | 4518 } |
4515 | 4519 |
4516 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { | 4520 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { |
4517 force_disable_overscroll_content_ = force_disable; | 4521 force_disable_overscroll_content_ = force_disable; |
4518 if (view_) | 4522 if (view_) |
4519 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); | 4523 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); |
4520 } | 4524 } |
4521 | 4525 |
4522 } // namespace content | 4526 } // namespace content |
OLD | NEW |