| 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 3776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3787 | 3787 |
| 3788 void Browser::OnInstallApplication(TabContents* source, | 3788 void Browser::OnInstallApplication(TabContents* source, |
| 3789 const WebApplicationInfo& web_app) { | 3789 const WebApplicationInfo& web_app) { |
| 3790 ExtensionService* extension_service = profile()->GetExtensionService(); | 3790 ExtensionService* extension_service = profile()->GetExtensionService(); |
| 3791 if (!extension_service) | 3791 if (!extension_service) |
| 3792 return; | 3792 return; |
| 3793 | 3793 |
| 3794 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create( | 3794 scoped_refptr<CrxInstaller> installer(CrxInstaller::Create( |
| 3795 extension_service, | 3795 extension_service, |
| 3796 extension_service->show_extensions_prompts() ? | 3796 extension_service->show_extensions_prompts() ? |
| 3797 new ExtensionInstallUI(profile()) : NULL)); | 3797 new ExtensionInstallPrompt(profile()) : NULL)); |
| 3798 installer->InstallWebApp(web_app); | 3798 installer->InstallWebApp(web_app); |
| 3799 } | 3799 } |
| 3800 | 3800 |
| 3801 /////////////////////////////////////////////////////////////////////////////// | 3801 /////////////////////////////////////////////////////////////////////////////// |
| 3802 // Browser, SelectFileDialog::Listener implementation: | 3802 // Browser, SelectFileDialog::Listener implementation: |
| 3803 | 3803 |
| 3804 void Browser::FileSelected(const FilePath& path, int index, void* params) { | 3804 void Browser::FileSelected(const FilePath& path, int index, void* params) { |
| 3805 profile_->set_last_selected_directory(path.DirName()); | 3805 profile_->set_last_selected_directory(path.DirName()); |
| 3806 GURL file_url = net::FilePathToFileURL(path); | 3806 GURL file_url = net::FilePathToFileURL(path); |
| 3807 | 3807 |
| (...skipping 1365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5173 if (contents && !allow_js_access) { | 5173 if (contents && !allow_js_access) { |
| 5174 contents->web_contents()->GetController().LoadURL( | 5174 contents->web_contents()->GetController().LoadURL( |
| 5175 target_url, | 5175 target_url, |
| 5176 content::Referrer(), | 5176 content::Referrer(), |
| 5177 content::PAGE_TRANSITION_LINK, | 5177 content::PAGE_TRANSITION_LINK, |
| 5178 std::string()); // No extra headers. | 5178 std::string()); // No extra headers. |
| 5179 } | 5179 } |
| 5180 | 5180 |
| 5181 return contents != NULL; | 5181 return contents != NULL; |
| 5182 } | 5182 } |
| OLD | NEW |