| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/extension_host.h" | 5 #include "extensions/browser/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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 } | 365 } |
| 366 | 366 |
| 367 void ExtensionHost::RenderViewDeleted(RenderViewHost* render_view_host) { | 367 void ExtensionHost::RenderViewDeleted(RenderViewHost* render_view_host) { |
| 368 // If our RenderViewHost is deleted, fall back to the host_contents' current | 368 // If our RenderViewHost is deleted, fall back to the host_contents' current |
| 369 // RVH. There is sometimes a small gap between the pending RVH being deleted | 369 // RVH. There is sometimes a small gap between the pending RVH being deleted |
| 370 // and RenderViewCreated being called, so we update it here. | 370 // and RenderViewCreated being called, so we update it here. |
| 371 if (render_view_host == render_view_host_) | 371 if (render_view_host == render_view_host_) |
| 372 render_view_host_ = host_contents_->GetRenderViewHost(); | 372 render_view_host_ = host_contents_->GetRenderViewHost(); |
| 373 } | 373 } |
| 374 | 374 |
| 375 content::JavaScriptDialogManager* ExtensionHost::GetJavaScriptDialogManager() { | 375 content::JavaScriptDialogManager* ExtensionHost::GetJavaScriptDialogManager( |
| 376 WebContents* source) { |
| 376 return delegate_->GetJavaScriptDialogManager(); | 377 return delegate_->GetJavaScriptDialogManager(); |
| 377 } | 378 } |
| 378 | 379 |
| 379 void ExtensionHost::AddNewContents(WebContents* source, | 380 void ExtensionHost::AddNewContents(WebContents* source, |
| 380 WebContents* new_contents, | 381 WebContents* new_contents, |
| 381 WindowOpenDisposition disposition, | 382 WindowOpenDisposition disposition, |
| 382 const gfx::Rect& initial_pos, | 383 const gfx::Rect& initial_pos, |
| 383 bool user_gesture, | 384 bool user_gesture, |
| 384 bool* was_blocked) { | 385 bool* was_blocked) { |
| 385 // First, if the creating extension view was associated with a tab contents, | 386 // First, if the creating extension view was associated with a tab contents, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 431 return delegate_->CheckMediaAccessPermission( | 432 return delegate_->CheckMediaAccessPermission( |
| 432 web_contents, security_origin, type, extension()); | 433 web_contents, security_origin, type, extension()); |
| 433 } | 434 } |
| 434 | 435 |
| 435 bool ExtensionHost::IsNeverVisible(content::WebContents* web_contents) { | 436 bool ExtensionHost::IsNeverVisible(content::WebContents* web_contents) { |
| 436 ViewType view_type = extensions::GetViewType(web_contents); | 437 ViewType view_type = extensions::GetViewType(web_contents); |
| 437 return view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; | 438 return view_type == extensions::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE; |
| 438 } | 439 } |
| 439 | 440 |
| 440 } // namespace extensions | 441 } // namespace extensions |
| OLD | NEW |