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/macros.h" | 9 #include "base/macros.h" |
10 #include "base/memory/weak_ptr.h" | 10 #include "base/memory/weak_ptr.h" |
11 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
12 #include "base/prefs/pref_service.h" | |
13 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
14 #include "chrome/browser/shell_integration.h" | 13 #include "chrome/browser/shell_integration.h" |
15 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
16 #include "chrome/browser/ui/browser_dialogs.h" | 15 #include "chrome/browser/ui/browser_dialogs.h" |
17 #include "chrome/browser/ui/browser_finder.h" | 16 #include "chrome/browser/ui/browser_finder.h" |
18 #include "chrome/browser/ui/browser_list.h" | 17 #include "chrome/browser/ui/browser_list.h" |
19 #include "chrome/browser/ui/browser_list_observer.h" | 18 #include "chrome/browser/ui/browser_list_observer.h" |
20 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
21 #include "chrome/browser/ui/chrome_pages.h" | 20 #include "chrome/browser/ui/chrome_pages.h" |
22 #include "chrome/browser/ui/singleton_tabs.h" | 21 #include "chrome/browser/ui/singleton_tabs.h" |
23 #include "chrome/browser/ui/sync/sync_promo_ui.h" | 22 #include "chrome/browser/ui/sync/sync_promo_ui.h" |
24 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 23 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
25 #include "chrome/common/pref_names.h" | 24 #include "chrome/common/pref_names.h" |
26 #include "chrome/common/url_constants.h" | 25 #include "chrome/common/url_constants.h" |
27 #include "chrome/grit/chromium_strings.h" | 26 #include "chrome/grit/chromium_strings.h" |
28 #include "chrome/grit/generated_resources.h" | 27 #include "chrome/grit/generated_resources.h" |
29 #include "chrome/grit/locale_settings.h" | 28 #include "chrome/grit/locale_settings.h" |
30 #include "chrome/installer/util/install_util.h" | 29 #include "chrome/installer/util/install_util.h" |
| 30 #include "components/prefs/pref_service.h" |
31 #include "content/public/browser/browser_thread.h" | 31 #include "content/public/browser/browser_thread.h" |
32 #include "content/public/browser/web_contents.h" | 32 #include "content/public/browser/web_contents.h" |
33 #include "content/public/browser/web_contents_delegate.h" | 33 #include "content/public/browser/web_contents_delegate.h" |
34 #include "content/public/browser/web_ui.h" | 34 #include "content/public/browser/web_ui.h" |
35 #include "content/public/browser/web_ui_data_source.h" | 35 #include "content/public/browser/web_ui_data_source.h" |
36 #include "content/public/browser/web_ui_message_handler.h" | 36 #include "content/public/browser/web_ui_message_handler.h" |
37 #include "grit/browser_resources.h" | 37 #include "grit/browser_resources.h" |
38 #include "ui/base/l10n/l10n_font_util.h" | 38 #include "ui/base/l10n/l10n_font_util.h" |
39 #include "ui/base/l10n/l10n_util.h" | 39 #include "ui/base/l10n/l10n_util.h" |
40 #include "ui/gfx/font.h" | 40 #include "ui/gfx/font.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); | 363 Profile::FromWebUI(web_ui), CreateSetAsDefaultBrowserUIHTMLSource()); |
364 } | 364 } |
365 | 365 |
366 // static | 366 // static |
367 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { | 367 void SetAsDefaultBrowserUI::Show(Profile* profile, Browser* browser) { |
368 DCHECK_CURRENTLY_ON(BrowserThread::UI); | 368 DCHECK_CURRENTLY_ON(BrowserThread::UI); |
369 SetAsDefaultBrowserDialogImpl* dialog = | 369 SetAsDefaultBrowserDialogImpl* dialog = |
370 new SetAsDefaultBrowserDialogImpl(profile, browser); | 370 new SetAsDefaultBrowserDialogImpl(profile, browser); |
371 dialog->ShowDialog(); | 371 dialog->ShowDialog(); |
372 } | 372 } |
OLD | NEW |