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

Side by Side Diff: content/browser/tab_contents/tab_contents.cc

Issue 8072011: Only allow to lock the mouse when the tab is in fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes in response to review comments & sync. Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/tab_contents/tab_contents.h" 5 #include "content/browser/tab_contents/tab_contents.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/metrics/histogram.h" 10 #include "base/metrics/histogram.h"
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 void TabContents::HandleMouseActivate() { 512 void TabContents::HandleMouseActivate() {
513 if (delegate_) 513 if (delegate_)
514 delegate_->HandleMouseActivate(); 514 delegate_->HandleMouseActivate();
515 } 515 }
516 516
517 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) { 517 void TabContents::ToggleFullscreenMode(bool enter_fullscreen) {
518 if (delegate_) 518 if (delegate_)
519 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen); 519 delegate_->ToggleFullscreenModeForTab(this, enter_fullscreen);
520 } 520 }
521 521
522 bool TabContents::IsFullscreenForCurrentTab() const {
523 return delegate_ ? delegate_->IsFullscreenForTab(this) : false;
524 }
525
522 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) { 526 void TabContents::UpdatePreferredSize(const gfx::Size& pref_size) {
523 if (delegate_) 527 if (delegate_)
524 delegate_->UpdatePreferredSize(this, pref_size); 528 delegate_->UpdatePreferredSize(this, pref_size);
525 } 529 }
526 530
527 void TabContents::ShowContents() { 531 void TabContents::ShowContents() {
528 RenderWidgetHostView* rwhv = GetRenderWidgetHostView(); 532 RenderWidgetHostView* rwhv = GetRenderWidgetHostView();
529 if (rwhv) 533 if (rwhv)
530 rwhv->DidBecomeSelected(); 534 rwhv->DidBecomeSelected();
531 } 535 }
(...skipping 1487 matching lines...) Expand 10 before | Expand all | Expand 10 after
2019 } 2023 }
2020 2024
2021 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) { 2025 void TabContents::SwapInRenderViewHost(RenderViewHost* rvh) {
2022 render_manager_.SwapInRenderViewHost(rvh); 2026 render_manager_.SwapInRenderViewHost(rvh);
2023 } 2027 }
2024 2028
2025 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { 2029 void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
2026 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh); 2030 RenderWidgetHostView* rwh_view = view()->CreateViewForWidget(rvh);
2027 rwh_view->SetSize(view()->GetContainerSize()); 2031 rwh_view->SetSize(view()->GetContainerSize());
2028 } 2032 }
OLDNEW
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | content/browser/tab_contents/tab_contents_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698