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

Side by Side Diff: chrome/browser/ui/extensions/application_launch.cc

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 #include "chrome/browser/ui/extensions/application_launch.h" 5 #include "chrome/browser/ui/extensions/application_launch.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/metrics/field_trial.h" 8 #include "base/metrics/field_trial.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "chrome/browser/extensions/default_apps_trial.h" 10 #include "chrome/browser/extensions/default_apps_trial.h"
11 #include "chrome/browser/extensions/extension_prefs.h" 11 #include "chrome/browser/extensions/extension_prefs.h"
12 #include "chrome/browser/extensions/extension_service.h" 12 #include "chrome/browser/extensions/extension_service.h"
13 #include "chrome/browser/extensions/extension_tab_helper.h" 13 #include "chrome/browser/extensions/extension_tab_helper.h"
14 #include "chrome/browser/extensions/platform_app_launcher.h" 14 #include "chrome/browser/extensions/platform_app_launcher.h"
15 #include "chrome/browser/profiles/profile.h" 15 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/browser.h" 16 #include "chrome/browser/ui/browser.h"
17 #include "chrome/browser/ui/browser_commands.h"
17 #include "chrome/browser/ui/browser_finder.h" 18 #include "chrome/browser/ui/browser_finder.h"
18 #include "chrome/browser/ui/browser_tabstrip.h" 19 #include "chrome/browser/ui/browser_tabstrip.h"
19 #include "chrome/browser/ui/browser_window.h" 20 #include "chrome/browser/ui/browser_window.h"
20 #include "chrome/browser/ui/panels/panel_manager.h" 21 #include "chrome/browser/ui/panels/panel_manager.h"
21 #include "chrome/browser/ui/tab_contents/tab_contents.h" 22 #include "chrome/browser/ui/tab_contents/tab_contents.h"
22 #include "chrome/browser/ui/tabs/tab_strip_model.h" 23 #include "chrome/browser/ui/tabs/tab_strip_model.h"
23 #include "chrome/browser/web_applications/web_app.h" 24 #include "chrome/browser/web_applications/web_app.h"
24 #include "chrome/common/chrome_switches.h" 25 #include "chrome/common/chrome_switches.h"
25 #include "chrome/common/extensions/extension.h" 26 #include "chrome/common/extensions/extension.h"
26 #include "chrome/common/extensions/extension_constants.h" 27 #include "chrome/common/extensions/extension_constants.h"
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
333 // In ash, LAUNCH_FULLSCREEN launches in a maximized app window and it should 334 // In ash, LAUNCH_FULLSCREEN launches in a maximized app window and it should
334 // not reach here. 335 // not reach here.
335 DCHECK(launch_type != ExtensionPrefs::LAUNCH_FULLSCREEN); 336 DCHECK(launch_type != ExtensionPrefs::LAUNCH_FULLSCREEN);
336 #else 337 #else
337 // TODO(skerner): If we are already in full screen mode, and the user 338 // TODO(skerner): If we are already in full screen mode, and the user
338 // set the app to open as a regular or pinned tab, what should happen? 339 // set the app to open as a regular or pinned tab, what should happen?
339 // Today we open the tab, but stay in full screen mode. Should we leave 340 // Today we open the tab, but stay in full screen mode. Should we leave
340 // full screen mode in this case? 341 // full screen mode in this case?
341 if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN && 342 if (launch_type == ExtensionPrefs::LAUNCH_FULLSCREEN &&
342 !browser->window()->IsFullscreen()) { 343 !browser->window()->IsFullscreen()) {
343 browser->ToggleFullscreenMode(); 344 chrome::ToggleFullscreenMode(browser);
344 } 345 }
345 #endif 346 #endif
346 347
347 return contents; 348 return contents;
348 } 349 }
349 350
350 } // namespace application_launch 351 } // namespace application_launch
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698