OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
8 #include <windows.h> | 8 #include <windows.h> |
9 #include <shellapi.h> | 9 #include <shellapi.h> |
10 #endif // OS_WIN | 10 #endif // OS_WIN |
(...skipping 1230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1241 return false; | 1241 return false; |
1242 controller.GoToIndex(index); | 1242 controller.GoToIndex(index); |
1243 return true; | 1243 return true; |
1244 } | 1244 } |
1245 | 1245 |
1246 browser::NavigateParams Browser::GetSingletonTabNavigateParams( | 1246 browser::NavigateParams Browser::GetSingletonTabNavigateParams( |
1247 const GURL& url) { | 1247 const GURL& url) { |
1248 browser::NavigateParams params(this, url, PageTransition::AUTO_BOOKMARK); | 1248 browser::NavigateParams params(this, url, PageTransition::AUTO_BOOKMARK); |
1249 params.disposition = SINGLETON_TAB; | 1249 params.disposition = SINGLETON_TAB; |
1250 params.window_action = browser::NavigateParams::SHOW_WINDOW; | 1250 params.window_action = browser::NavigateParams::SHOW_WINDOW; |
1251 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | |
Evan Stade
2011/08/11 17:43:24
If we always want this, then why do we even have t
flackr
2011/08/12 14:44:10
So after playing with the other sections (history,
| |
1251 params.user_gesture = true; | 1252 params.user_gesture = true; |
1252 return params; | 1253 return params; |
1253 } | 1254 } |
1254 | 1255 |
1255 void Browser::ShowSingletonTab(const GURL& url) { | 1256 void Browser::ShowSingletonTab(const GURL& url) { |
1256 browser::NavigateParams params(GetSingletonTabNavigateParams(url)); | 1257 browser::NavigateParams params(GetSingletonTabNavigateParams(url)); |
1257 browser::Navigate(¶ms); | 1258 browser::Navigate(¶ms); |
1258 } | 1259 } |
1259 | 1260 |
1260 void Browser::ShowSingletonTabOverwritingNTP( | 1261 void Browser::ShowSingletonTabOverwritingNTP( |
(...skipping 3579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4840 } | 4841 } |
4841 | 4842 |
4842 void Browser::ShowSyncSetup() { | 4843 void Browser::ShowSyncSetup() { |
4843 ProfileSyncService* service = | 4844 ProfileSyncService* service = |
4844 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4845 profile()->GetOriginalProfile()->GetProfileSyncService(); |
4845 if (service->HasSyncSetupCompleted()) | 4846 if (service->HasSyncSetupCompleted()) |
4846 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4847 ShowOptionsTab(chrome::kSyncSetupSubPage); |
4847 else | 4848 else |
4848 service->ShowLoginDialog(); | 4849 service->ShowLoginDialog(); |
4849 } | 4850 } |
OLD | NEW |