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

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

Issue 10560015: Implement base::win::IsMetroProcess. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 8 years, 6 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/browser.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.cc » ('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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "base/win/metro.h" 8 #include "base/win/metro.h"
9 #include "chrome/browser/bookmarks/bookmark_utils.h" 9 #include "chrome/browser/bookmarks/bookmark_utils.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 21 matching lines...) Expand all
32 if (browser != source_browser) { 32 if (browser != source_browser) {
33 // Tell the metro_driver to flip our window. This causes the current 33 // Tell the metro_driver to flip our window. This causes the current
34 // browser window to be hidden and the next window to be shown. 34 // browser window to be hidden and the next window to be shown.
35 flip_window_fn(); 35 flip_window_fn();
36 } 36 }
37 } 37 }
38 38
39 } // namespace 39 } // namespace
40 40
41 void Browser::NewWindow() { 41 void Browser::NewWindow() {
42 if (base::win::GetMetroModule()) { 42 if (base::win::IsMetroProcess()) {
43 NewMetroWindow(this, profile_->GetOriginalProfile()); 43 NewMetroWindow(this, profile_->GetOriginalProfile());
44 return; 44 return;
45 } 45 }
46 NewEmptyWindow(profile_->GetOriginalProfile()); 46 NewEmptyWindow(profile_->GetOriginalProfile());
47 } 47 }
48 48
49 void Browser::NewIncognitoWindow() { 49 void Browser::NewIncognitoWindow() {
50 if (base::win::GetMetroModule()) { 50 if (base::win::IsMetroProcess()) {
51 NewMetroWindow(this, profile_->GetOffTheRecordProfile()); 51 NewMetroWindow(this, profile_->GetOffTheRecordProfile());
52 return; 52 return;
53 } 53 }
54 NewEmptyWindow(profile_->GetOffTheRecordProfile()); 54 NewEmptyWindow(profile_->GetOffTheRecordProfile());
55 } 55 }
56 56
57 void Browser::SetMetroSnapMode(bool enable) { 57 void Browser::SetMetroSnapMode(bool enable) {
58 fullscreen_controller_->SetMetroSnapMode(enable); 58 fullscreen_controller_->SetMetroSnapMode(enable);
59 } 59 }
60 60
(...skipping 13 matching lines...) Expand all
74 NOTREACHED(); 74 NOTREACHED();
75 return; 75 return;
76 } 76 }
77 77
78 VLOG(1) << __FUNCTION__ << " calling pin with title: " << title 78 VLOG(1) << __FUNCTION__ << " calling pin with title: " << title
79 << " and url " << UTF8ToUTF16(url.spec()); 79 << " and url " << UTF8ToUTF16(url.spec());
80 metro_pin_url_to_start_screen(title, UTF8ToUTF16(url.spec())); 80 metro_pin_url_to_start_screen(title, UTF8ToUTF16(url.spec()));
81 return; 81 return;
82 } 82 }
83 } 83 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser.cc ('k') | chrome/browser/ui/tab_contents/tab_contents.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698