| 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/webui/set_as_default_browser_ui.h" | 5 #include "chrome/browser/ui/webui/set_as_default_browser_ui.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
| 9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
| 10 #include "chrome/browser/first_run/first_run.h" | 10 #include "chrome/browser/first_run/first_run.h" |
| 11 #include "chrome/browser/prefs/pref_service.h" | 11 #include "chrome/browser/prefs/pref_service.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/shell_integration.h" |
| 13 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 14 #include "chrome/browser/ui/browser_dialogs.h" | 15 #include "chrome/browser/ui/browser_dialogs.h" |
| 15 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
| 16 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
| 17 #include "chrome/browser/ui/browser_window.h" | 18 #include "chrome/browser/ui/browser_window.h" |
| 18 #include "chrome/browser/ui/chrome_pages.h" | 19 #include "chrome/browser/ui/chrome_pages.h" |
| 19 #include "chrome/browser/ui/singleton_tabs.h" | 20 #include "chrome/browser/ui/singleton_tabs.h" |
| 20 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" | 21 #include "chrome/browser/ui/webui/chrome_web_ui_data_source.h" |
| 21 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" | 22 #include "chrome/browser/ui/webui/sync_promo/sync_promo_ui.h" |
| 22 #include "chrome/browser/shell_integration.h" | |
| 23 #include "chrome/common/pref_names.h" | 23 #include "chrome/common/pref_names.h" |
| 24 #include "chrome/common/url_constants.h" | 24 #include "chrome/common/url_constants.h" |
| 25 #include "chrome/installer/util/install_util.h" | 25 #include "chrome/installer/util/install_util.h" |
| 26 #include "content/public/browser/web_contents.h" | 26 #include "content/public/browser/web_contents.h" |
| 27 #include "content/public/browser/web_contents_delegate.h" | 27 #include "content/public/browser/web_contents_delegate.h" |
| 28 #include "content/public/browser/web_ui.h" | 28 #include "content/public/browser/web_ui.h" |
| 29 #include "content/public/browser/web_ui_message_handler.h" | 29 #include "content/public/browser/web_ui_message_handler.h" |
| 30 #include "grit/browser_resources.h" | 30 #include "grit/browser_resources.h" |
| 31 #include "grit/generated_resources.h" | 31 #include "grit/generated_resources.h" |
| 32 #include "grit/locale_settings.h" | 32 #include "grit/locale_settings.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 void SetAsDefaultBrowserUI::Show(Profile* profile, | 317 void SetAsDefaultBrowserUI::Show(Profile* profile, |
| 318 Browser* browser, | 318 Browser* browser, |
| 319 bool dialog) { | 319 bool dialog) { |
| 320 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 320 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
| 321 if (dialog) { | 321 if (dialog) { |
| 322 SetAsDefaultBrowserDialogImpl* dialog = | 322 SetAsDefaultBrowserDialogImpl* dialog = |
| 323 new SetAsDefaultBrowserDialogImpl(profile, browser); | 323 new SetAsDefaultBrowserDialogImpl(profile, browser); |
| 324 dialog->ShowDialog(); | 324 dialog->ShowDialog(); |
| 325 } else { | 325 } else { |
| 326 GURL url(chrome::kChromeUIMetroFlowURL); | 326 GURL url(chrome::kChromeUIMetroFlowURL); |
| 327 browser::NavigateParams params( | 327 chrome::NavigateParams params( |
| 328 chrome::GetSingletonTabNavigateParams(browser, url)); | 328 chrome::GetSingletonTabNavigateParams(browser, url)); |
| 329 params.path_behavior = browser::NavigateParams::IGNORE_AND_NAVIGATE; | 329 params.path_behavior = chrome::NavigateParams::IGNORE_AND_NAVIGATE; |
| 330 chrome::ShowSingletonTabOverwritingNTP(browser, params); | 330 chrome::ShowSingletonTabOverwritingNTP(browser, params); |
| 331 } | 331 } |
| 332 } | 332 } |
| OLD | NEW |