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

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

Issue 769363002: Initialize BrowserPluginGuest to attach to the View hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@basic_detach_plumbing
Patch Set: Addressed Charlie's comments Created 6 years 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
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/navigation_details.h" 9 #include "content/public/browser/navigation_details.h"
10 #include "content/public/browser/render_frame_host.h" 10 #include "content/public/browser/render_frame_host.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 owner_web_contents()->GetMainFrame()->GetRoutingID(), 328 owner_web_contents()->GetMainFrame()->GetRoutingID(),
329 element_instance_id_)); 329 element_instance_id_));
330 element_instance_id_ = guestview::kInstanceIDNone; 330 element_instance_id_ = guestview::kInstanceIDNone;
331 } 331 }
332 332
333 void GuestViewBase::ElementSizeChanged(const gfx::Size& old_size, 333 void GuestViewBase::ElementSizeChanged(const gfx::Size& old_size,
334 const gfx::Size& new_size) { 334 const gfx::Size& new_size) {
335 element_size_ = new_size; 335 element_size_ = new_size;
336 } 336 }
337 337
338 WebContents* GuestViewBase::GetOwnerWebContents() const {
339 return owner_web_contents_;
340 }
341
338 void GuestViewBase::GuestSizeChanged(const gfx::Size& old_size, 342 void GuestViewBase::GuestSizeChanged(const gfx::Size& old_size,
339 const gfx::Size& new_size) { 343 const gfx::Size& new_size) {
340 if (!auto_size_enabled_) 344 if (!auto_size_enabled_)
341 return; 345 return;
342 guest_size_ = new_size; 346 guest_size_ = new_size;
343 GuestSizeChangedDueToAutoSize(old_size, new_size); 347 GuestSizeChangedDueToAutoSize(old_size, new_size);
344 } 348 }
345 349
346 const GURL& GuestViewBase::GetOwnerSiteURL() const { 350 const GURL& GuestViewBase::GetOwnerSiteURL() const {
347 return owner_web_contents()->GetLastCommittedURL(); 351 return owner_web_contents()->GetLastCommittedURL();
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
530 534
531 // static 535 // static
532 void GuestViewBase::RegisterGuestViewTypes() { 536 void GuestViewBase::RegisterGuestViewTypes() {
533 AppViewGuest::Register(); 537 AppViewGuest::Register();
534 ExtensionOptionsGuest::Register(); 538 ExtensionOptionsGuest::Register();
535 MimeHandlerViewGuest::Register(); 539 MimeHandlerViewGuest::Register();
536 WebViewGuest::Register(); 540 WebViewGuest::Register();
537 } 541 }
538 542
539 } // namespace extensions 543 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698