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

Side by Side Diff: chrome/browser/ui/extensions/extension_install_ui_default.cc

Issue 1260033003: Partially componentize //chrome/browser/search/search.{h,cc} (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix compilation on iOS Created 5 years, 4 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/extensions/extension_install_ui_default.h" 5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 222
223 void ExtensionInstallUIDefault::OpenAppInstalledUI(const std::string& app_id) { 223 void ExtensionInstallUIDefault::OpenAppInstalledUI(const std::string& app_id) {
224 #if defined(OS_CHROMEOS) 224 #if defined(OS_CHROMEOS)
225 // App Launcher always enabled on ChromeOS, so always handled in 225 // App Launcher always enabled on ChromeOS, so always handled in
226 // OnInstallSuccess. 226 // OnInstallSuccess.
227 NOTREACHED(); 227 NOTREACHED();
228 #else 228 #else
229 Profile* current_profile = profile_->GetOriginalProfile(); 229 Profile* current_profile = profile_->GetOriginalProfile();
230 Browser* browser = FindOrCreateVisibleBrowser(current_profile); 230 Browser* browser = FindOrCreateVisibleBrowser(current_profile);
231 if (browser) { 231 if (browser) {
232 GURL url(chrome::IsInstantExtendedAPIEnabled() 232 GURL url(search::IsInstantExtendedAPIEnabled()
233 ? chrome::kChromeUIAppsURL 233 ? chrome::kChromeUIAppsURL
234 : chrome::kChromeUINewTabURL); 234 : chrome::kChromeUINewTabURL);
235 chrome::NavigateParams params( 235 chrome::NavigateParams params(
236 chrome::GetSingletonTabNavigateParams(browser, url)); 236 chrome::GetSingletonTabNavigateParams(browser, url));
237 chrome::Navigate(&params); 237 chrome::Navigate(&params);
238 238
239 content::NotificationService::current()->Notify( 239 content::NotificationService::current()->Notify(
240 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP, 240 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
241 content::Source<WebContents>(params.target_contents), 241 content::Source<WebContents>(params.target_contents),
242 content::Details<const std::string>(&app_id)); 242 content::Details<const std::string>(&app_id));
(...skipping 12 matching lines...) Expand all
255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { 255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() {
256 Browser* browser = 256 Browser* browser =
257 chrome::FindLastActiveWithProfile(profile_, chrome::GetActiveDesktop()); 257 chrome::FindLastActiveWithProfile(profile_, chrome::GetActiveDesktop());
258 if (browser) { 258 if (browser) {
259 content::WebContents* contents = 259 content::WebContents* contents =
260 browser->tab_strip_model()->GetActiveWebContents(); 260 browser->tab_strip_model()->GetActiveWebContents();
261 return contents->GetTopLevelNativeWindow(); 261 return contents->GetTopLevelNativeWindow();
262 } 262 }
263 return NULL; 263 return NULL;
264 } 264 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_instant_controller_unittest.cc ('k') | chrome/browser/ui/omnibox/chrome_omnibox_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698