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

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

Issue 10700071: browser: Remove fullscreen functions and have callers call FullscreenController directly. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Created 8 years, 5 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 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h" 53 #import "chrome/browser/ui/cocoa/presentation_mode_controller.h"
54 #import "chrome/browser/ui/cocoa/status_bubble_mac.h" 54 #import "chrome/browser/ui/cocoa/status_bubble_mac.h"
55 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h" 55 #import "chrome/browser/ui/cocoa/tab_contents/previewable_contents_controller.h"
56 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h" 56 #import "chrome/browser/ui/cocoa/tab_contents/sad_tab_controller.h"
57 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h" 57 #import "chrome/browser/ui/cocoa/tab_contents/tab_contents_controller.h"
58 #import "chrome/browser/ui/cocoa/tabpose_window.h" 58 #import "chrome/browser/ui/cocoa/tabpose_window.h"
59 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h" 59 #import "chrome/browser/ui/cocoa/tabs/tab_strip_controller.h"
60 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h" 60 #import "chrome/browser/ui/cocoa/tabs/tab_strip_view.h"
61 #import "chrome/browser/ui/cocoa/tabs/tab_view.h" 61 #import "chrome/browser/ui/cocoa/tabs/tab_view.h"
62 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h" 62 #import "chrome/browser/ui/cocoa/toolbar/toolbar_controller.h"
63 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
63 #include "chrome/browser/ui/omnibox/location_bar.h" 64 #include "chrome/browser/ui/omnibox/location_bar.h"
64 #include "chrome/browser/ui/tab_contents/tab_contents.h" 65 #include "chrome/browser/ui/tab_contents/tab_contents.h"
65 #include "chrome/browser/ui/tabs/dock_info.h" 66 #include "chrome/browser/ui/tabs/dock_info.h"
66 #include "chrome/browser/ui/tabs/tab_strip_model.h" 67 #include "chrome/browser/ui/tabs/tab_strip_model.h"
67 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h" 68 #include "chrome/browser/ui/toolbar/encoding_menu_controller.h"
68 #include "chrome/browser/ui/window_sizer/window_sizer.h" 69 #include "chrome/browser/ui/window_sizer/window_sizer.h"
69 #include "chrome/common/chrome_switches.h" 70 #include "chrome/common/chrome_switches.h"
70 #include "chrome/common/url_constants.h" 71 #include "chrome/common/url_constants.h"
71 #include "content/public/browser/render_view_host.h" 72 #include "content/public/browser/render_view_host.h"
72 #include "content/public/browser/render_widget_host_view.h" 73 #include "content/public/browser/render_widget_host_view.h"
(...skipping 1945 matching lines...) Expand 10 before | Expand all | Expand 10 after
2018 2019
2019 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen 2020 // Presentation mode on Leopard and Snow Leopard maps directly to fullscreen
2020 // mode. 2021 // mode.
2021 if (base::mac::IsOSSnowLeopardOrEarlier()) { 2022 if (base::mac::IsOSSnowLeopardOrEarlier()) {
2022 [self setFullscreen:presentationMode url:url bubbleType:bubbleType]; 2023 [self setFullscreen:presentationMode url:url bubbleType:bubbleType];
2023 return; 2024 return;
2024 } 2025 }
2025 2026
2026 if (presentationMode) { 2027 if (presentationMode) {
2027 BOOL fullscreen = [self isFullscreen]; 2028 BOOL fullscreen = [self isFullscreen];
2028 BOOL fullscreen_for_tab = browser_->IsFullscreenForTabOrPending(); 2029 BOOL fullscreen_for_tab =
2030 browser_->fullscreen_controller()->IsFullscreenForTabOrPending();
2029 if (!fullscreen_for_tab) 2031 if (!fullscreen_for_tab)
2030 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES]; 2032 [self setShouldUsePresentationModeWhenEnteringFullscreen:YES];
2031 enteredPresentationModeFromFullscreen_ = fullscreen; 2033 enteredPresentationModeFromFullscreen_ = fullscreen;
2032 2034
2033 if (fullscreen) { 2035 if (fullscreen) {
2034 // If already in fullscreen mode, just toggle the presentation mode 2036 // If already in fullscreen mode, just toggle the presentation mode
2035 // setting. Go through an elaborate dance to force the overlay to show, 2037 // setting. Go through an elaborate dance to force the overlay to show,
2036 // then animate out once the mouse moves away. This helps draw attention 2038 // then animate out once the mouse moves away. This helps draw attention
2037 // to the fact that the UI is in an overlay. Focus the tab contents 2039 // to the fact that the UI is in an overlay. Focus the tab contents
2038 // because the omnibox is the most likely source of bar visibility locks, 2040 // because the omnibox is the most likely source of bar visibility locks,
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
2214 2216
2215 - (BOOL)supportsBookmarkBar { 2217 - (BOOL)supportsBookmarkBar {
2216 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR]; 2218 return [self supportsWindowFeature:Browser::FEATURE_BOOKMARKBAR];
2217 } 2219 }
2218 2220
2219 - (BOOL)isTabbedWindow { 2221 - (BOOL)isTabbedWindow {
2220 return browser_->is_type_tabbed(); 2222 return browser_->is_type_tabbed();
2221 } 2223 }
2222 2224
2223 @end // @implementation BrowserWindowController(WindowType) 2225 @end // @implementation BrowserWindowController(WindowType)
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_cocoa.mm ('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