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_host.h" | 5 #include "chrome/browser/extensions/extension_host.h" |
6 | 6 |
7 #include <list> | 7 #include <list> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/memory/singleton.h" | 10 #include "base/memory/singleton.h" |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
561 | 561 |
562 void ExtensionHost::RenderViewDeleted(RenderViewHost* render_view_host) { | 562 void ExtensionHost::RenderViewDeleted(RenderViewHost* render_view_host) { |
563 // If our RenderViewHost is deleted, fall back to the host_contents' current | 563 // If our RenderViewHost is deleted, fall back to the host_contents' current |
564 // RVH. There is sometimes a small gap between the pending RVH being deleted | 564 // RVH. There is sometimes a small gap between the pending RVH being deleted |
565 // and RenderViewCreated being called, so we update it here. | 565 // and RenderViewCreated being called, so we update it here. |
566 if (render_view_host == render_view_host_) | 566 if (render_view_host == render_view_host_) |
567 render_view_host_ = host_contents_->GetRenderViewHost(); | 567 render_view_host_ = host_contents_->GetRenderViewHost(); |
568 } | 568 } |
569 | 569 |
570 content::JavaScriptDialogManager* ExtensionHost::GetJavaScriptDialogManager() { | 570 content::JavaScriptDialogManager* ExtensionHost::GetJavaScriptDialogManager() { |
571 if (!dialog_manager_.get()) { | 571 if (!dialog_manager_) { |
572 dialog_manager_.reset(CreateJavaScriptDialogManagerInstance(this)); | 572 dialog_manager_.reset(CreateJavaScriptDialogManagerInstance(this)); |
573 } | 573 } |
574 return dialog_manager_.get(); | 574 return dialog_manager_.get(); |
575 } | 575 } |
576 | 576 |
577 void ExtensionHost::RunFileChooser(WebContents* tab, | 577 void ExtensionHost::RunFileChooser(WebContents* tab, |
578 const content::FileChooserParams& params) { | 578 const content::FileChooserParams& params) { |
579 FileSelectHelper::RunFileChooser(tab, params); | 579 FileSelectHelper::RunFileChooser(tab, params); |
580 } | 580 } |
581 | 581 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
621 | 621 |
622 void ExtensionHost::RequestMediaAccessPermission( | 622 void ExtensionHost::RequestMediaAccessPermission( |
623 content::WebContents* web_contents, | 623 content::WebContents* web_contents, |
624 const content::MediaStreamRequest& request, | 624 const content::MediaStreamRequest& request, |
625 const content::MediaResponseCallback& callback) { | 625 const content::MediaResponseCallback& callback) { |
626 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( | 626 MediaCaptureDevicesDispatcher::GetInstance()->ProcessMediaAccessRequest( |
627 web_contents, request, callback, extension()); | 627 web_contents, request, callback, extension()); |
628 } | 628 } |
629 | 629 |
630 } // namespace extensions | 630 } // namespace extensions |
OLD | NEW |