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

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

Issue 10683003: Moved CrxInstaller and CrxInstallerError into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
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/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // OS_WIN 10 #endif // OS_WIN
(...skipping 2074 matching lines...) Expand 10 before | Expand all | Expand 10 after
2085 2085
2086 pending_web_app_action_ = NONE; 2086 pending_web_app_action_ = NONE;
2087 } 2087 }
2088 2088
2089 void Browser::OnInstallApplication(TabContents* source, 2089 void Browser::OnInstallApplication(TabContents* source,
2090 const WebApplicationInfo& web_app) { 2090 const WebApplicationInfo& web_app) {
2091 ExtensionService* extension_service = profile()->GetExtensionService(); 2091 ExtensionService* extension_service = profile()->GetExtensionService();
2092 if (!extension_service) 2092 if (!extension_service)
2093 return; 2093 return;
2094 2094
2095 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create( 2095 scoped_refptr<extensions::CrxInstaller> installer(
2096 extension_service, 2096 extensions::CrxInstaller::Create(
2097 extension_service->show_extensions_prompts() ? 2097 extension_service,
2098 new ExtensionInstallPrompt(this) : NULL)); 2098 extension_service->show_extensions_prompts() ?
2099 new ExtensionInstallPrompt(this) : NULL));
2099 installer->InstallWebApp(web_app); 2100 installer->InstallWebApp(web_app);
2100 } 2101 }
2101 2102
2102 /////////////////////////////////////////////////////////////////////////////// 2103 ///////////////////////////////////////////////////////////////////////////////
2103 // Browser, SelectFileDialog::Listener implementation: 2104 // Browser, SelectFileDialog::Listener implementation:
2104 2105
2105 void Browser::FileSelected(const FilePath& path, int index, void* params) { 2106 void Browser::FileSelected(const FilePath& path, int index, void* params) {
2106 profile_->set_last_selected_directory(path.DirName()); 2107 profile_->set_last_selected_directory(path.DirName());
2107 GURL file_url = net::FilePathToFileURL(path); 2108 GURL file_url = net::FilePathToFileURL(path);
2108 2109
(...skipping 707 matching lines...) Expand 10 before | Expand all | Expand 10 after
2816 if (contents && !allow_js_access) { 2817 if (contents && !allow_js_access) {
2817 contents->web_contents()->GetController().LoadURL( 2818 contents->web_contents()->GetController().LoadURL(
2818 target_url, 2819 target_url,
2819 content::Referrer(), 2820 content::Referrer(),
2820 content::PAGE_TRANSITION_LINK, 2821 content::PAGE_TRANSITION_LINK,
2821 std::string()); // No extra headers. 2822 std::string()); // No extra headers.
2822 } 2823 }
2823 2824
2824 return contents != NULL; 2825 return contents != NULL;
2825 } 2826 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698