Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: extensions/browser/guest_view/guest_view_base.cc

Issue 531963002: Add support for file inputs for all guest views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Implement RunFileChooser as GuestViewBase method Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.h ('k') | extensions/browser/guest_view/web_view/web_view_guest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698