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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller.mm

Issue 9702055: Automated tests for full screen & mouse lock M16 features (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Valgrind error fix, merge to 130358 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
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 #import "chrome/browser/ui/cocoa/browser_window_controller.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <numeric> 8 #include <numeric>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 1996 matching lines...) Expand 10 before | Expand all | Expand 10 after
2007 2007
2008 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen 2008 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen
2009 // mode. 2009 // mode.
2010 if (base::mac::IsOSSnowLeopardOrEarlier()) { 2010 if (base::mac::IsOSSnowLeopardOrEarlier()) {
2011 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; 2011 [self setFullscreen:presentationMode url:url bubbleType:bubbleType];
2012 return; 2012 return;
2013 } 2013 }
2014 2014
2015 if (presentationMode) { 2015 if (presentationMode) {
2016 BOOL fullscreen = [self isFullscreen]; 2016 BOOL fullscreen = [self isFullscreen];
2017 BOOL fullscreen_for_tab = browser_->IsFullscreenForTab(); 2017 BOOL fullscreen_for_tab = browser_->IsFullscreenForTabOrPending();
2018 if (!fullscreen_for_tab) 2018 if (!fullscreen_for_tab)
2019 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; 2019 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES];
2020 enteredPresentationModeFromFullscreen_ = fullscreen; 2020 enteredPresentationModeFromFullscreen_ = fullscreen;
2021 2021
2022 if (fullscreen) { 2022 if (fullscreen) {
2023 // If already in fullscreen mode, just toggle the presentation mode 2023 // If already in fullscreen mode, just toggle the presentation mode
2024 // setting. Go through an elaborate dance to force the overlay to show, 2024 // setting. Go through an elaborate dance to force the overlay to show,
2025 // then animate out once the mouse moves away. This helps draw attention 2025 // then animate out once the mouse moves away. This helps draw attention
2026 // to the fact that the UI is in an overlay. Focus the tab contents 2026 // to the fact that the UI is in an overlay. Focus the tab contents
2027 // because the omnibox is the most likely source of bar visibility locks, 2027 // because the omnibox is the most likely source of bar visibility locks,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2203 2203
2204 - (BOOL)supportsBookmarkBar { 2204 - (BOOL)supportsBookmarkBar {
2205 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2205 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2206 } 2206 }
2207 2207
2208 - (BOOL)isTabbedWindow { 2208 - (BOOL)isTabbedWindow {
2209 return browser_->is_type_tabbed(); 2209 return browser_->is_type_tabbed();
2210 } 2210 }
2211 2211
2212 @end // @implementation BrowserWindowController(WindowType) 2212 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_unittest.cc ('k') | chrome/browser/ui/cocoa/browser_window_controller_private.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698