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

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

Issue 58853004: [win8] Force browsers created with Chrome in Metro mode to be on the Ash desktop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: respond to comments Created 7 years, 1 month 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
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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include "ash/shell.h"
7 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
8 #include "base/win/metro.h" 9 #include "base/win/metro.h"
9 #include "chrome/browser/bookmarks/bookmark_utils.h" 10 #include "chrome/browser/bookmarks/bookmark_utils.h"
10 #include "chrome/browser/profiles/profile.h" 11 #include "chrome/browser/profiles/profile.h"
11 #include "chrome/browser/ui/browser_commands.h" 12 #include "chrome/browser/ui/browser_commands.h"
12 #include "chrome/browser/ui/browser_finder.h" 13 #include "chrome/browser/ui/browser_finder.h"
13 #include "chrome/browser/ui/browser_tabstrip.h" 14 #include "chrome/browser/ui/browser_tabstrip.h"
14 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h" 15 #include "chrome/browser/ui/fullscreen/fullscreen_controller.h"
15 #include "win8/util/win8_util.h" 16 #include "win8/util/win8_util.h"
16 17
(...skipping 26 matching lines...) Expand all
43 } 44 }
44 } else { 45 } else {
45 NewEmptyWindow(profile, host_desktop_type); 46 NewEmptyWindow(profile, host_desktop_type);
46 } 47 }
47 } 48 }
48 49
49 } // namespace 50 } // namespace
50 51
51 namespace chrome { 52 namespace chrome {
52 53
54 HostDesktopType GetVerifiedHostDesktopForBrowser(HostDesktopType desktop_type) {
55 if (ash::Shell::HasInstance())
56 return chrome::HOST_DESKTOP_TYPE_ASH;
57
58 return desktop_type;
59 }
60
53 void NewWindow(Browser* browser) { 61 void NewWindow(Browser* browser) {
54 NewWindowMaybeMetro(browser, browser->profile()->GetOriginalProfile()); 62 NewWindowMaybeMetro(browser, browser->profile()->GetOriginalProfile());
55 } 63 }
56 64
57 void NewIncognitoWindow(Browser* browser) { 65 void NewIncognitoWindow(Browser* browser) {
58 NewWindowMaybeMetro(browser, browser->profile()->GetOffTheRecordProfile()); 66 NewWindowMaybeMetro(browser, browser->profile()->GetOffTheRecordProfile());
59 } 67 }
60 68
61 } // namespace chrome 69 } // namespace chrome
62 70
63 void Browser::SetMetroSnapMode(bool enable) { 71 void Browser::SetMetroSnapMode(bool enable) {
64 fullscreen_controller_->SetMetroSnapMode(enable); 72 fullscreen_controller_->SetMetroSnapMode(enable);
65 } 73 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698