| 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 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 } else { | 376 } else { |
| 377 rvh->DisableAutoResize(element_size_); | 377 rvh->DisableAutoResize(element_size_); |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 void GuestViewBase::WebContentsDestroyed() { | 381 void GuestViewBase::WebContentsDestroyed() { |
| 382 GuestDestroyed(); | 382 GuestDestroyed(); |
| 383 delete this; | 383 delete this; |
| 384 } | 384 } |
| 385 | 385 |
| 386 void GuestViewBase::RunFileChooser(WebContents* web_contents, |
| 387 const content::FileChooserParams& params) { |
| 388 if (!attached() || !embedder_web_contents()->GetDelegate()) |
| 389 return; |
| 390 |
| 391 embedder_web_contents()->GetDelegate()->RunFileChooser(web_contents, params); |
| 392 } |
| 393 |
| 386 bool GuestViewBase::ShouldFocusPageAfterCrash() { | 394 bool GuestViewBase::ShouldFocusPageAfterCrash() { |
| 387 // Focus is managed elsewhere. | 395 // Focus is managed elsewhere. |
| 388 return false; | 396 return false; |
| 389 } | 397 } |
| 390 | 398 |
| 391 bool GuestViewBase::PreHandleGestureEvent(content::WebContents* source, | 399 bool GuestViewBase::PreHandleGestureEvent(content::WebContents* source, |
| 392 const blink::WebGestureEvent& event) { | 400 const blink::WebGestureEvent& event) { |
| 393 return event.type == blink::WebGestureEvent::GesturePinchBegin || | 401 return event.type == blink::WebGestureEvent::GesturePinchBegin || |
| 394 event.type == blink::WebGestureEvent::GesturePinchUpdate || | 402 event.type == blink::WebGestureEvent::GesturePinchUpdate || |
| 395 event.type == blink::WebGestureEvent::GesturePinchEnd; | 403 event.type == blink::WebGestureEvent::GesturePinchEnd; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 449 } | 457 } |
| 450 | 458 |
| 451 // static | 459 // static |
| 452 void GuestViewBase::RegisterGuestViewTypes() { | 460 void GuestViewBase::RegisterGuestViewTypes() { |
| 453 AppViewGuest::Register(); | 461 AppViewGuest::Register(); |
| 454 WebViewGuest::Register(); | 462 WebViewGuest::Register(); |
| 455 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); | 463 ExtensionsAPIClient::Get()->RegisterGuestViewTypes(); |
| 456 } | 464 } |
| 457 | 465 |
| 458 } // namespace extensions | 466 } // namespace extensions |
| OLD | NEW |