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

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

Issue 964403003: Make it possible to set the display mode from Chromium (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Improved the added browser test 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
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 1558 matching lines...) Expand 10 before | Expand all | Expand 10 after
1569 1569
1570 FOR_EACH_OBSERVER(WebContentsObserver, 1570 FOR_EACH_OBSERVER(WebContentsObserver,
1571 observers_, 1571 observers_,
1572 DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab())); 1572 DidToggleFullscreenModeForTab(IsFullscreenForCurrentTab()));
1573 } 1573 }
1574 1574
1575 bool WebContentsImpl::IsFullscreenForCurrentTab() const { 1575 bool WebContentsImpl::IsFullscreenForCurrentTab() const {
1576 return delegate_ ? delegate_->IsFullscreenForTabOrPending(this) : false; 1576 return delegate_ ? delegate_->IsFullscreenForTabOrPending(this) : false;
1577 } 1577 }
1578 1578
1579 blink::WebDisplayMode WebContentsImpl::GetDisplayMode() const {
1580 return delegate_ ? delegate_->GetDisplayMode(this)
1581 : blink::WebDisplayModeBrowser;
1582 }
1583
1579 void WebContentsImpl::RequestToLockMouse(bool user_gesture, 1584 void WebContentsImpl::RequestToLockMouse(bool user_gesture,
1580 bool last_unlocked_by_target) { 1585 bool last_unlocked_by_target) {
1581 if (delegate_) { 1586 if (delegate_) {
1582 delegate_->RequestToLockMouse(this, user_gesture, last_unlocked_by_target); 1587 delegate_->RequestToLockMouse(this, user_gesture, last_unlocked_by_target);
1583 } else { 1588 } else {
1584 GotResponseToLockMouseRequest(false); 1589 GotResponseToLockMouseRequest(false);
1585 } 1590 }
1586 } 1591 }
1587 1592
1588 void WebContentsImpl::LostMouseLock() { 1593 void WebContentsImpl::LostMouseLock() {
(...skipping 3059 matching lines...) Expand 10 before | Expand all | Expand 10 after
4648 node->render_manager()->ResumeResponseDeferredAtStart(); 4653 node->render_manager()->ResumeResponseDeferredAtStart();
4649 } 4654 }
4650 4655
4651 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4656 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4652 force_disable_overscroll_content_ = force_disable; 4657 force_disable_overscroll_content_ = force_disable;
4653 if (view_) 4658 if (view_)
4654 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4659 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4655 } 4660 }
4656 4661
4657 } // namespace content 4662 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698