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

Side by Side Diff: chrome/browser/ui/startup/startup_browser_creator_impl.cc

Issue 2656213002: Makes SessionCrashedBubbleView work on chromeos (Closed)
Patch Set: consent works on chromeos Created 3 years, 10 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
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/startup/startup_browser_creator_impl.h" 5 #include "chrome/browser/ui/startup/startup_browser_creator_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 #include "chrome/browser/ui/browser_tabstrip.h" 64 #include "chrome/browser/ui/browser_tabstrip.h"
65 #include "chrome/browser/ui/browser_window.h" 65 #include "chrome/browser/ui/browser_window.h"
66 #include "chrome/browser/ui/chrome_pages.h" 66 #include "chrome/browser/ui/chrome_pages.h"
67 #include "chrome/browser/ui/extensions/app_launch_params.h" 67 #include "chrome/browser/ui/extensions/app_launch_params.h"
68 #include "chrome/browser/ui/extensions/application_launch.h" 68 #include "chrome/browser/ui/extensions/application_launch.h"
69 #include "chrome/browser/ui/session_crashed_bubble.h" 69 #include "chrome/browser/ui/session_crashed_bubble.h"
70 #include "chrome/browser/ui/startup/bad_flags_prompt.h" 70 #include "chrome/browser/ui/startup/bad_flags_prompt.h"
71 #include "chrome/browser/ui/startup/default_browser_prompt.h" 71 #include "chrome/browser/ui/startup/default_browser_prompt.h"
72 #include "chrome/browser/ui/startup/google_api_keys_infobar_delegate.h" 72 #include "chrome/browser/ui/startup/google_api_keys_infobar_delegate.h"
73 #include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h" 73 #include "chrome/browser/ui/startup/obsolete_system_infobar_delegate.h"
74 #include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
75 #include "chrome/browser/ui/startup/startup_browser_creator.h" 74 #include "chrome/browser/ui/startup/startup_browser_creator.h"
76 #include "chrome/browser/ui/startup/startup_features.h" 75 #include "chrome/browser/ui/startup/startup_features.h"
77 #include "chrome/browser/ui/tabs/pinned_tab_codec.h" 76 #include "chrome/browser/ui/tabs/pinned_tab_codec.h"
78 #include "chrome/browser/ui/tabs/tab_strip_model.h" 77 #include "chrome/browser/ui/tabs/tab_strip_model.h"
79 #include "chrome/common/chrome_constants.h" 78 #include "chrome/common/chrome_constants.h"
80 #include "chrome/common/chrome_paths.h" 79 #include "chrome/common/chrome_paths.h"
81 #include "chrome/common/chrome_result_codes.h" 80 #include "chrome/common/chrome_result_codes.h"
82 #include "chrome/common/chrome_switches.h" 81 #include "chrome/common/chrome_switches.h"
83 #include "chrome/common/extensions/extension_constants.h" 82 #include "chrome/common/extensions/extension_constants.h"
84 #include "chrome/common/extensions/extension_metrics.h" 83 #include "chrome/common/extensions/extension_metrics.h"
(...skipping 13 matching lines...) Expand all
98 #include "content/public/browser/web_contents.h" 97 #include "content/public/browser/web_contents.h"
99 #include "content/public/common/content_switches.h" 98 #include "content/public/common/content_switches.h"
100 #include "extensions/browser/extension_prefs.h" 99 #include "extensions/browser/extension_prefs.h"
101 #include "extensions/browser/extension_registry.h" 100 #include "extensions/browser/extension_registry.h"
102 #include "extensions/common/constants.h" 101 #include "extensions/common/constants.h"
103 #include "extensions/common/extension.h" 102 #include "extensions/common/extension.h"
104 #include "extensions/common/extension_set.h" 103 #include "extensions/common/extension_set.h"
105 #include "net/base/network_change_notifier.h" 104 #include "net/base/network_change_notifier.h"
106 #include "rlz/features/features.h" 105 #include "rlz/features/features.h"
107 #include "ui/base/l10n/l10n_util.h" 106 #include "ui/base/l10n/l10n_util.h"
107 #include "ui/base/ui_features.h"
108 108
109 #if defined(OS_MACOSX) 109 #if defined(OS_MACOSX)
110 #include "base/mac/mac_util.h" 110 #include "base/mac/mac_util.h"
111 #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h" 111 #include "chrome/browser/ui/cocoa/keystone_infobar_delegate.h"
112 #endif 112 #endif
113 113
114 #if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
115 #include "chrome/browser/ui/startup/session_crashed_infobar_delegate.h"
116 #endif
117
114 #if defined(OS_WIN) 118 #if defined(OS_WIN)
115 #include "base/win/windows_version.h" 119 #include "base/win/windows_version.h"
116 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h" 120 #include "chrome/browser/apps/app_launch_for_metro_restart_win.h"
117 #include "chrome/browser/search_engines/template_url_service_factory.h" 121 #include "chrome/browser/search_engines/template_url_service_factory.h"
118 #include "chrome/browser/shell_integration_win.h" 122 #include "chrome/browser/shell_integration_win.h"
119 #endif 123 #endif
120 124
121 #if BUILDFLAG(ENABLE_RLZ) 125 #if BUILDFLAG(ENABLE_RLZ)
122 #include "components/rlz/rlz_tracker.h" // nogncheck 126 #include "components/rlz/rlz_tracker.h" // nogncheck
123 #endif 127 #endif
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 } 794 }
791 795
792 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary( 796 void StartupBrowserCreatorImpl::AddInfoBarsIfNecessary(
793 Browser* browser, 797 Browser* browser,
794 chrome::startup::IsProcessStartup is_process_startup) { 798 chrome::startup::IsProcessStartup is_process_startup) {
795 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0) 799 if (!browser || !profile_ || browser->tab_strip_model()->count() == 0)
796 return; 800 return;
797 801
798 if (HasPendingUncleanExit(browser->profile()) && 802 if (HasPendingUncleanExit(browser->profile()) &&
799 !SessionCrashedBubble::Show(browser)) { 803 !SessionCrashedBubble::Show(browser)) {
804 #if defined(OS_MACOSX) && !BUILDFLAG(MAC_VIEWS_BROWSER)
800 SessionCrashedInfoBarDelegate::Create(browser); 805 SessionCrashedInfoBarDelegate::Create(browser);
806 #endif
801 } 807 }
802 808
803 // The below info bars are only added to the first profile which is launched. 809 // The below info bars are only added to the first profile which is launched.
804 // Other profiles might be restoring the browsing sessions asynchronously, 810 // Other profiles might be restoring the browsing sessions asynchronously,
805 // so we cannot add the info bars to the focused tabs here. 811 // so we cannot add the info bars to the focused tabs here.
806 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP && 812 if (is_process_startup == chrome::startup::IS_PROCESS_STARTUP &&
807 !command_line_.HasSwitch(switches::kTestType)) { 813 !command_line_.HasSwitch(switches::kTestType)) {
808 chrome::ShowBadFlagsPrompt(browser); 814 chrome::ShowBadFlagsPrompt(browser);
809 GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents( 815 GoogleApiKeysInfoBarDelegate::Create(InfoBarService::FromWebContents(
810 browser->tab_strip_model()->GetActiveWebContents())); 816 browser->tab_strip_model()->GetActiveWebContents()));
(...skipping 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
1222 #if defined(OS_WIN) 1228 #if defined(OS_WIN)
1223 TriggeredProfileResetter* triggered_profile_resetter = 1229 TriggeredProfileResetter* triggered_profile_resetter =
1224 TriggeredProfileResetterFactory::GetForBrowserContext(profile_); 1230 TriggeredProfileResetterFactory::GetForBrowserContext(profile_);
1225 // TriggeredProfileResetter instance will be nullptr for incognito profiles. 1231 // TriggeredProfileResetter instance will be nullptr for incognito profiles.
1226 if (triggered_profile_resetter) { 1232 if (triggered_profile_resetter) {
1227 has_reset_trigger = triggered_profile_resetter->HasResetTrigger(); 1233 has_reset_trigger = triggered_profile_resetter->HasResetTrigger();
1228 } 1234 }
1229 #endif // defined(OS_WIN) 1235 #endif // defined(OS_WIN)
1230 return has_reset_trigger; 1236 return has_reset_trigger;
1231 } 1237 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/startup/session_crashed_infobar_delegate.h ('k') | chrome/browser/ui/views/frame/browser_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698