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

Unified Diff: chrome/browser/webview/webview_guest.h

Issue 12189018: <webview>: Implement WebRequest API (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed unit test Created 7 years, 7 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 | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/webview/webview_guest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/webview/webview_guest.h
diff --git a/chrome/browser/webview/webview_guest.h b/chrome/browser/webview/webview_guest.h
new file mode 100644
index 0000000000000000000000000000000000000000..a7dc292f19d064360901fe29a983081899efdadf
--- /dev/null
+++ b/chrome/browser/webview/webview_guest.h
@@ -0,0 +1,43 @@
+// Copyright (c) 2013 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 CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
+#define CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
+
+#include "content/public/browser/web_contents_observer.h"
+
+namespace chrome {
+
+class WebViewGuest : public content::WebContentsObserver {
Matt Perry 2013/05/16 21:16:39 Please add comments to this class.
Fady Samuel 2013/05/17 03:02:33 Done.
+ public:
+ WebViewGuest(content::WebContents* guest_web_contents,
+ content::WebContents* embedder_web_contents,
+ const std::string& extension_id);
+ virtual ~WebViewGuest();
+
+ static WebViewGuest* From(void* profile, int instance_id);
+
+ content::WebContents* embedder_web_contents() const {
+ return embedder_web_contents_;
+ }
+
+ content::WebContents* web_contents() const {
+ return WebContentsObserver::web_contents();
+ }
+ private:
+ virtual void WebContentsDestroyed(
+ content::WebContents* web_contents) OVERRIDE;
+
+ content::WebContents* embedder_web_contents_;
+ std::string extension_id_;
+ int embedder_render_process_id_;
+ // Profile and instance ID are cached here because |web_contents()| is
+ // null on destruction.
+ void* profile_;
+ int instance_id_;
+};
+
+} // namespace chrome
+
+#endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
« no previous file with comments | « chrome/browser/extensions/extension_process_manager.cc ('k') | chrome/browser/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698