| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |