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

Side by Side Diff: chrome/browser/ui/fullscreen_controller.cc

Issue 10067033: RefCounted types should not have public destructors, chrome/browser/ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge fix Created 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.h ('k') | chrome/browser/ui/login/login_prompt.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 "chrome/browser/ui/fullscreen_controller.h" 5 #include "chrome/browser/ui/fullscreen_controller.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "chrome/browser/content_settings/host_content_settings_map.h" 10 #include "chrome/browser/content_settings/host_content_settings_map.h"
(...skipping 19 matching lines...) Expand all
30 Browser* browser) 30 Browser* browser)
31 : window_(window), 31 : window_(window),
32 profile_(profile), 32 profile_(profile),
33 browser_(browser), 33 browser_(browser),
34 fullscreened_tab_(NULL), 34 fullscreened_tab_(NULL),
35 tab_caused_fullscreen_(false), 35 tab_caused_fullscreen_(false),
36 tab_fullscreen_accepted_(false), 36 tab_fullscreen_accepted_(false),
37 mouse_lock_state_(MOUSELOCK_NOT_REQUESTED) { 37 mouse_lock_state_(MOUSELOCK_NOT_REQUESTED) {
38 } 38 }
39 39
40 FullscreenController::~FullscreenController() {}
41
42 bool FullscreenController::IsFullscreenForBrowser() const { 40 bool FullscreenController::IsFullscreenForBrowser() const {
43 return window_->IsFullscreen() && !tab_caused_fullscreen_; 41 return window_->IsFullscreen() && !tab_caused_fullscreen_;
44 } 42 }
45 43
46 bool FullscreenController::IsFullscreenForTabOrPending() const { 44 bool FullscreenController::IsFullscreenForTabOrPending() const {
47 return fullscreened_tab_ != NULL; 45 return fullscreened_tab_ != NULL;
48 } 46 }
49 47
50 bool FullscreenController::IsFullscreenForTabOrPending( 48 bool FullscreenController::IsFullscreenForTabOrPending(
51 const WebContents* tab) const { 49 const WebContents* tab) const {
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 #endif 262 #endif
265 } 263 }
266 264
267 bool FullscreenController::HandleUserPressedEscape() { 265 bool FullscreenController::HandleUserPressedEscape() {
268 if (!IsFullscreenForTabOrPending()) 266 if (!IsFullscreenForTabOrPending())
269 return false; 267 return false;
270 ExitTabbedFullscreenModeIfNecessary(); 268 ExitTabbedFullscreenModeIfNecessary();
271 return true; 269 return true;
272 } 270 }
273 271
272 FullscreenController::~FullscreenController() {}
273
274 void FullscreenController::NotifyTabOfFullscreenExitIfNecessary() { 274 void FullscreenController::NotifyTabOfFullscreenExitIfNecessary() {
275 if (fullscreened_tab_) { 275 if (fullscreened_tab_) {
276 RenderViewHost* rvh = 276 RenderViewHost* rvh =
277 fullscreened_tab_->web_contents()->GetRenderViewHost(); 277 fullscreened_tab_->web_contents()->GetRenderViewHost();
278 fullscreened_tab_ = NULL; 278 fullscreened_tab_ = NULL;
279 tab_caused_fullscreen_ = false; 279 tab_caused_fullscreen_ = false;
280 tab_fullscreen_accepted_ = false; 280 tab_fullscreen_accepted_ = false;
281 mouse_lock_state_ = MOUSELOCK_NOT_REQUESTED; 281 mouse_lock_state_ = MOUSELOCK_NOT_REQUESTED;
282 if (rvh) 282 if (rvh)
283 rvh->ExitFullscreen(); 283 rvh->ExitFullscreen();
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
403 // WindowFullscreenStateChanged(). We don't do this immediately as 403 // WindowFullscreenStateChanged(). We don't do this immediately as
404 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let 404 // BrowserWindow::EnterFullscreen() asks for bookmark_bar_state_, so we let
405 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate. 405 // the BrowserWindow invoke WindowFullscreenStateChanged when appropriate.
406 406
407 // TODO: convert mac to invoke WindowFullscreenStateChanged once it updates 407 // TODO: convert mac to invoke WindowFullscreenStateChanged once it updates
408 // the necessary state of the frame. 408 // the necessary state of the frame.
409 #if defined(OS_MACOSX) 409 #if defined(OS_MACOSX)
410 WindowFullscreenStateChanged(); 410 WindowFullscreenStateChanged();
411 #endif 411 #endif
412 } 412 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/fullscreen_controller.h ('k') | chrome/browser/ui/login/login_prompt.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698