| 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/tab_helper.h" | 5 #include "chrome/browser/extensions/tab_helper.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 WebstoreAPI::Get(profile_)->OnInlineInstallStart( | 388 WebstoreAPI::Get(profile_)->OnInlineInstallStart( |
| 389 return_route_id, this, webstore_item_id, listeners_mask); | 389 return_route_id, this, webstore_item_id, listeners_mask); |
| 390 | 390 |
| 391 WebstoreStandaloneInstaller::Callback callback = | 391 WebstoreStandaloneInstaller::Callback callback = |
| 392 base::Bind(&TabHelper::OnInlineInstallComplete, | 392 base::Bind(&TabHelper::OnInlineInstallComplete, |
| 393 base::Unretained(this), | 393 base::Unretained(this), |
| 394 install_id, | 394 install_id, |
| 395 return_route_id); | 395 return_route_id); |
| 396 scoped_refptr<WebstoreInlineInstaller> installer( | 396 scoped_refptr<WebstoreInlineInstaller> installer( |
| 397 webstore_inline_installer_factory_->CreateInstaller( | 397 webstore_inline_installer_factory_->CreateInstaller( |
| 398 web_contents(), | 398 web_contents(), host, webstore_item_id, requestor_url, callback)); |
| 399 webstore_item_id, | |
| 400 requestor_url, | |
| 401 callback)); | |
| 402 installer->BeginInstall(); | 399 installer->BeginInstall(); |
| 403 } | 400 } |
| 404 } | 401 } |
| 405 | 402 |
| 406 void TabHelper::OnGetAppInstallState(content::RenderFrameHost* host, | 403 void TabHelper::OnGetAppInstallState(content::RenderFrameHost* host, |
| 407 const GURL& requestor_url, | 404 const GURL& requestor_url, |
| 408 int return_route_id, | 405 int return_route_id, |
| 409 int callback_id) { | 406 int callback_id) { |
| 410 ExtensionRegistry* registry = | 407 ExtensionRegistry* registry = |
| 411 ExtensionRegistry::Get(web_contents()->GetBrowserContext()); | 408 ExtensionRegistry::Get(web_contents()->GetBrowserContext()); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 566 } | 563 } |
| 567 } | 564 } |
| 568 | 565 |
| 569 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) { | 566 void TabHelper::SetTabId(content::RenderFrameHost* render_frame_host) { |
| 570 render_frame_host->Send( | 567 render_frame_host->Send( |
| 571 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(), | 568 new ExtensionMsg_SetTabId(render_frame_host->GetRoutingID(), |
| 572 SessionTabHelper::IdForTab(web_contents()))); | 569 SessionTabHelper::IdForTab(web_contents()))); |
| 573 } | 570 } |
| 574 | 571 |
| 575 } // namespace extensions | 572 } // namespace extensions |
| OLD | NEW |