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/guest_view/guest_view_base.h" | 5 #include "extensions/browser/guest_view/guest_view_base.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "content/public/browser/render_frame_host.h" | 9 #include "content/public/browser/render_frame_host.h" |
10 #include "content/public/browser/render_process_host.h" | 10 #include "content/public/browser/render_process_host.h" |
(...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 } else { | 378 } else { |
379 rvh->DisableAutoResize(element_size_); | 379 rvh->DisableAutoResize(element_size_); |
380 } | 380 } |
381 } | 381 } |
382 | 382 |
383 void GuestViewBase::WebContentsDestroyed() { | 383 void GuestViewBase::WebContentsDestroyed() { |
384 GuestDestroyed(); | 384 GuestDestroyed(); |
385 delete this; | 385 delete this; |
386 } | 386 } |
387 | 387 |
| 388 void GuestViewBase::ActivateContents(WebContents* web_contents) { |
| 389 if (!attached() || !embedder_web_contents()->GetDelegate()) |
| 390 return; |
| 391 |
| 392 embedder_web_contents()->GetDelegate()->ActivateContents( |
| 393 embedder_web_contents()); |
| 394 } |
| 395 |
| 396 void GuestViewBase::DeactivateContents(WebContents* web_contents) { |
| 397 if (!attached() || !embedder_web_contents()->GetDelegate()) |
| 398 return; |
| 399 |
| 400 embedder_web_contents()->GetDelegate()->DeactivateContents( |
| 401 embedder_web_contents()); |
| 402 } |
| 403 |
388 void GuestViewBase::RunFileChooser(WebContents* web_contents, | 404 void GuestViewBase::RunFileChooser(WebContents* web_contents, |
389 const content::FileChooserParams& params) { | 405 const content::FileChooserParams& params) { |
390 if (!attached() || !embedder_web_contents()->GetDelegate()) | 406 if (!attached() || !embedder_web_contents()->GetDelegate()) |
391 return; | 407 return; |
392 | 408 |
393 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); | 409 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); |
394 } | 410 } |
395 | 411 |
396 bool GuestViewBase::ShouldFocusPageAfterCrash() { | 412 bool GuestViewBase::ShouldFocusPageAfterCrash() { |
397 // Focus is managed elsewhere. | 413 // Focus is managed elsewhere. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
460 | 476 |
461 // static | 477 // static |
462 void GuestViewBase::RegisterGuestViewTypes() { | 478 void GuestViewBase::RegisterGuestViewTypes() { |
463 AppViewGuest::Register(); | 479 AppViewGuest::Register(); |
464 ExtensionOptionsGuest::Register(); | 480 ExtensionOptionsGuest::Register(); |
465 MimeHandlerViewGuest::Register(); | 481 MimeHandlerViewGuest::Register(); |
466 WebViewGuest::Register(); | 482 WebViewGuest::Register(); |
467 } | 483 } |
468 | 484 |
469 } // namespace extensions | 485 } // namespace extensions |
OLD | NEW |