| 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/extensions/extension_tab_helper.h" | 5 #include "chrome/browser/extensions/extension_tab_helper.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/crx_installer.h" | 7 #include "chrome/browser/extensions/crx_installer.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/extensions/page_action_controller.h" | 9 #include "chrome/browser/extensions/page_action_controller.h" |
| 10 #include "chrome/browser/extensions/script_badge_controller.h" | 10 #include "chrome/browser/extensions/script_badge_controller.h" |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 246 scoped_refptr<CrxInstaller> installer( | 246 scoped_refptr<CrxInstaller> installer( |
| 247 CrxInstaller::Create(extension_service, prompt)); | 247 CrxInstaller::Create(extension_service, prompt)); |
| 248 installer->InstallWebApp(info); | 248 installer->InstallWebApp(info); |
| 249 } | 249 } |
| 250 | 250 |
| 251 void ExtensionTabHelper::OnInlineWebstoreInstall( | 251 void ExtensionTabHelper::OnInlineWebstoreInstall( |
| 252 int install_id, | 252 int install_id, |
| 253 int return_route_id, | 253 int return_route_id, |
| 254 const std::string& webstore_item_id, | 254 const std::string& webstore_item_id, |
| 255 const GURL& requestor_url) { | 255 const GURL& requestor_url) { |
| 256 scoped_refptr<WebstoreInlineInstaller> installer(new WebstoreInlineInstaller( | 256 scoped_refptr<extensions::WebstoreInlineInstaller> installer( |
| 257 web_contents(), | 257 new extensions::WebstoreInlineInstaller( |
| 258 install_id, | 258 web_contents(), |
| 259 return_route_id, | 259 install_id, |
| 260 webstore_item_id, | 260 return_route_id, |
| 261 requestor_url, | 261 webstore_item_id, |
| 262 this)); | 262 requestor_url, |
| 263 this)); |
| 263 installer->BeginInstall(); | 264 installer->BeginInstall(); |
| 264 } | 265 } |
| 265 | 266 |
| 266 void ExtensionTabHelper::OnGetAppNotifyChannel( | 267 void ExtensionTabHelper::OnGetAppNotifyChannel( |
| 267 const GURL& requestor_url, | 268 const GURL& requestor_url, |
| 268 const std::string& client_id, | 269 const std::string& client_id, |
| 269 int return_route_id, | 270 int return_route_id, |
| 270 int callback_id) { | 271 int callback_id) { |
| 271 | 272 |
| 272 // Check for permission first. | 273 // Check for permission first. |
| (...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 456 // last committed entry is not NULL. Last committed entry could be NULL | 457 // last committed entry is not NULL. Last committed entry could be NULL |
| 457 // when an interstitial page is injected (e.g. bad https certificate, | 458 // when an interstitial page is injected (e.g. bad https certificate, |
| 458 // malware site etc). When this happens, we abort the shortcut update. | 459 // malware site etc). When this happens, we abort the shortcut update. |
| 459 NavigationEntry* entry = controller.GetLastCommittedEntry(); | 460 NavigationEntry* entry = controller.GetLastCommittedEntry(); |
| 460 if (entry) | 461 if (entry) |
| 461 GetApplicationInfo(entry->GetPageID()); | 462 GetApplicationInfo(entry->GetPageID()); |
| 462 else | 463 else |
| 463 pending_web_app_action_ = NONE; | 464 pending_web_app_action_ = NONE; |
| 464 } | 465 } |
| 465 } | 466 } |
| OLD | NEW |