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

Unified Diff: content/public/browser/guest_host.h

Issue 910073003: <webview>: Make contentWindow available prior to attachment (on display:none). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed nit Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/browser/browser_plugin_guest_delegate.h ('k') | content/public/browser/guest_sizer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/guest_host.h
diff --git a/content/public/browser/guest_host.h b/content/public/browser/guest_host.h
new file mode 100644
index 0000000000000000000000000000000000000000..c955e4616c9d095c2148e1774bb1db67a9c55273
--- /dev/null
+++ b/content/public/browser/guest_host.h
@@ -0,0 +1,37 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
+#define CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
+
+#include "ui/gfx/geometry/size.h"
+
+namespace content {
+
+// A GuestHost is the content API for a guest WebContents.
+// Guests are top-level frames that can be embedded within other pages.
+// The content module manages routing of input events and compositing, but all
+// other operations are managed outside of content. To limit exposure of
+// implementation details within content, content embedders must use this
+// interface for loading, sizing, and cleanup of guests.
+//
+// This class currently only serves as a base class for BrowserPluginGuest, and
+// its API can only be accessed by a BrowserPluginGuestDelegate.
+class GuestHost {
+ public:
+ // Loads a URL using the specified |load_params| and returns a routing ID for
+ // a proxy for the guest.
+ virtual int LoadURLWithParams(
+ const NavigationController::LoadURLParams& load_params) = 0;
+
+ // Sets the size of the guest WebContents.
+ virtual void SizeContents(const gfx::Size& new_size) = 0;
+
+ // Called when the GuestHost is about to be destroyed.
+ virtual void WillDestroy() = 0;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_GUEST_HOST_H_
« no previous file with comments | « content/public/browser/browser_plugin_guest_delegate.h ('k') | content/public/browser/guest_sizer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698