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/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 4012 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4023 | 4023 |
4024 void Browser::OnInstallApplication(TabContentsWrapper* source, | 4024 void Browser::OnInstallApplication(TabContentsWrapper* source, |
4025 const WebApplicationInfo& web_app) { | 4025 const WebApplicationInfo& web_app) { |
4026 ExtensionService* extension_service = profile()->GetExtensionService(); | 4026 ExtensionService* extension_service = profile()->GetExtensionService(); |
4027 if (!extension_service) | 4027 if (!extension_service) |
4028 return; | 4028 return; |
4029 | 4029 |
4030 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create( | 4030 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create( |
4031 extension_service, | 4031 extension_service, |
4032 extension_service->show_extensions_prompts() ? | 4032 extension_service->show_extensions_prompts() ? |
4033 new ExtensionInstallUI(profile()) : NULL)); | 4033 new ExtensionInstallPrompt(profile()) : NULL)); |
4034 installer->InstallWebApp(web_app); | 4034 installer->InstallWebApp(web_app); |
4035 } | 4035 } |
4036 | 4036 |
4037 /////////////////////////////////////////////////////////////////////////////// | 4037 /////////////////////////////////////////////////////////////////////////////// |
4038 // Browser, SelectFileDialog::Listener implementation: | 4038 // Browser, SelectFileDialog::Listener implementation: |
4039 | 4039 |
4040 void Browser::FileSelected(const FilePath& path, int index, void* params) { | 4040 void Browser::FileSelected(const FilePath& path, int index, void* params) { |
4041 profile_->set_last_selected_directory(path.DirName()); | 4041 profile_->set_last_selected_directory(path.DirName()); |
4042 GURL file_url = net::FilePathToFileURL(path); | 4042 GURL file_url = net::FilePathToFileURL(path); |
4043 | 4043 |
(...skipping 1356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5400 if (contents && !allow_js_access) { | 5400 if (contents && !allow_js_access) { |
5401 contents->web_contents()->GetController().LoadURL( | 5401 contents->web_contents()->GetController().LoadURL( |
5402 target_url, | 5402 target_url, |
5403 content::Referrer(), | 5403 content::Referrer(), |
5404 content::PAGE_TRANSITION_LINK, | 5404 content::PAGE_TRANSITION_LINK, |
5405 std::string()); // No extra headers. | 5405 std::string()); // No extra headers. |
5406 } | 5406 } |
5407 | 5407 |
5408 return contents != NULL; | 5408 return contents != NULL; |
5409 } | 5409 } |
OLD | NEW |