| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/memory/singleton.h" | 9 #include "base/memory/singleton.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 | 190 |
| 191 SiteInstance* ExtensionHost::site_instance() const { | 191 SiteInstance* ExtensionHost::site_instance() const { |
| 192 return render_view_host_->site_instance(); | 192 return render_view_host_->site_instance(); |
| 193 } | 193 } |
| 194 | 194 |
| 195 bool ExtensionHost::IsRenderViewLive() const { | 195 bool ExtensionHost::IsRenderViewLive() const { |
| 196 return render_view_host_->IsRenderViewLive(); | 196 return render_view_host_->IsRenderViewLive(); |
| 197 } | 197 } |
| 198 | 198 |
| 199 void ExtensionHost::CreateRenderViewSoon(RenderWidgetHostView* host_view) { | 199 void ExtensionHost::CreateRenderViewSoon(RenderWidgetHostView* host_view) { |
| 200 render_view_host_->set_view(host_view); | 200 render_view_host_->SetView(host_view); |
| 201 if (render_view_host_->process()->HasConnection()) { | 201 if (render_view_host_->process()->HasConnection()) { |
| 202 // If the process is already started, go ahead and initialize the RenderView | 202 // If the process is already started, go ahead and initialize the RenderView |
| 203 // synchronously. The process creation is the real meaty part that we want | 203 // synchronously. The process creation is the real meaty part that we want |
| 204 // to defer. | 204 // to defer. |
| 205 CreateRenderViewNow(); | 205 CreateRenderViewNow(); |
| 206 } else { | 206 } else { |
| 207 ProcessCreationQueue::GetInstance()->CreateSoon(this); | 207 ProcessCreationQueue::GetInstance()->CreateSoon(this); |
| 208 } | 208 } |
| 209 } | 209 } |
| 210 | 210 |
| (...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 802 } | 802 } |
| 803 } | 803 } |
| 804 | 804 |
| 805 void ExtensionHost::OnRunFileChooser( | 805 void ExtensionHost::OnRunFileChooser( |
| 806 const ViewHostMsg_RunFileChooser_Params& params) { | 806 const ViewHostMsg_RunFileChooser_Params& params) { |
| 807 if (file_select_helper_.get() == NULL) | 807 if (file_select_helper_.get() == NULL) |
| 808 file_select_helper_.reset(new FileSelectHelper(profile())); | 808 file_select_helper_.reset(new FileSelectHelper(profile())); |
| 809 file_select_helper_->RunFileChooser(render_view_host_, | 809 file_select_helper_->RunFileChooser(render_view_host_, |
| 810 GetAssociatedTabContents(), params); | 810 GetAssociatedTabContents(), params); |
| 811 } | 811 } |
| OLD | NEW |