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

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

Issue 10698068: chrome: Put browser_navigator.h into chrome namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: already in chrome namespace Created 8 years, 5 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 | Annotate | Revision Log
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/extensions/extension_install_ui_default.h" 5 #include "chrome/browser/extensions/extension_install_ui_default.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/extensions/extension_install_prompt.h" 9 #include "chrome/browser/extensions/extension_install_prompt.h"
10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 virtual int GetButtons() const OVERRIDE { 65 virtual int GetButtons() const OVERRIDE {
66 return BUTTON_OK; 66 return BUTTON_OK;
67 } 67 }
68 68
69 virtual string16 GetLinkText() const OVERRIDE { 69 virtual string16 GetLinkText() const OVERRIDE {
70 return error_.type() == CrxInstallerError::ERROR_OFF_STORE ? 70 return error_.type() == CrxInstallerError::ERROR_OFF_STORE ?
71 l10n_util::GetStringUTF16(IDS_LEARN_MORE) : ASCIIToUTF16(""); 71 l10n_util::GetStringUTF16(IDS_LEARN_MORE) : ASCIIToUTF16("");
72 } 72 }
73 73
74 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE { 74 virtual bool LinkClicked(WindowOpenDisposition disposition) OVERRIDE {
75 browser::NavigateParams params( 75 chrome::NavigateParams params(
76 browser_, 76 browser_,
77 GURL("http://support.google.com/chrome_webstore/?p=crx_warning"), 77 GURL("http://support.google.com/chrome_webstore/?p=crx_warning"),
78 content::PAGE_TRANSITION_LINK); 78 content::PAGE_TRANSITION_LINK);
79 params.disposition = NEW_FOREGROUND_TAB; 79 params.disposition = NEW_FOREGROUND_TAB;
80 browser::Navigate(&params); 80 chrome::Navigate(&params);
81 return false; 81 return false;
82 } 82 }
83 83
84 Browser* browser_; 84 Browser* browser_;
85 CrxInstallerError error_; 85 CrxInstallerError error_;
86 }; 86 };
87 87
88 } // namespace 88 } // namespace
89 89
90 ExtensionInstallUIDefault::ExtensionInstallUIDefault(Browser* browser) 90 ExtensionInstallUIDefault::ExtensionInstallUIDefault(Browser* browser)
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 227
228 // static 228 // static
229 ExtensionInstallUI* ExtensionInstallUI::Create(Browser* browser) { 229 ExtensionInstallUI* ExtensionInstallUI::Create(Browser* browser) {
230 return new ExtensionInstallUIDefault(browser); 230 return new ExtensionInstallUIDefault(browser);
231 } 231 }
232 232
233 // static 233 // static
234 void ExtensionInstallUI::OpenAppInstalledUI(Browser* browser, 234 void ExtensionInstallUI::OpenAppInstalledUI(Browser* browser,
235 const std::string& app_id) { 235 const std::string& app_id) {
236 if (NewTabUI::ShouldShowApps()) { 236 if (NewTabUI::ShouldShowApps()) {
237 browser::NavigateParams params = chrome::GetSingletonTabNavigateParams( 237 chrome::NavigateParams params(chrome::GetSingletonTabNavigateParams(
238 browser, GURL(chrome::kChromeUINewTabURL)); 238 browser, GURL(chrome::kChromeUINewTabURL)));
239 browser::Navigate(&params); 239 chrome::Navigate(&params);
240 240
241 content::NotificationService::current()->Notify( 241 content::NotificationService::current()->Notify(
242 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP, 242 chrome::NOTIFICATION_APP_INSTALLED_TO_NTP,
243 content::Source<WebContents>(params.target_contents->web_contents()), 243 content::Source<WebContents>(params.target_contents->web_contents()),
244 content::Details<const std::string>(&app_id)); 244 content::Details<const std::string>(&app_id));
245 } else { 245 } else {
246 #if defined(USE_ASH) 246 #if defined(USE_ASH)
247 ash::Shell::GetInstance()->ToggleAppList(); 247 ash::Shell::GetInstance()->ToggleAppList();
248 248
249 content::NotificationService::current()->Notify( 249 content::NotificationService::current()->Notify(
250 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST, 250 chrome::NOTIFICATION_APP_INSTALLED_TO_APPLIST,
251 content::Source<Profile>(browser->profile()), 251 content::Source<Profile>(browser->profile()),
252 content::Details<const std::string>(&app_id)); 252 content::Details<const std::string>(&app_id));
253 #else 253 #else
254 NOTREACHED(); 254 NOTREACHED();
255 #endif 255 #endif
256 } 256 }
257 } 257 }
258 258
259 // static 259 // static
260 void ExtensionInstallUI::DisableFailureUIForTests() { 260 void ExtensionInstallUI::DisableFailureUIForTests() {
261 disable_failure_ui_for_tests = true; 261 disable_failure_ui_for_tests = true;
262 } 262 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.cc ('k') | chrome/browser/history/android/visit_sql_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698