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

Side by Side 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: Profile* => void* 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/webview/webview_guest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
6 #define CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
7
8 #include "content/public/browser/web_contents_observer.h"
9
10 namespace chrome {
11
12 // A WebViewGuest is a WebContentsObserver on the guest WebContents of a
13 // <webview> tag. It provides the browser-side implementation of the <webview>
14 // API and manages the lifetime of <webview> extension events.
15 class WebViewGuest : public content::WebContentsObserver {
16 public:
17 WebViewGuest(content::WebContents* guest_web_contents,
18 content::WebContents* embedder_web_contents,
19 const std::string& extension_id);
20
21 static WebViewGuest* From(void* profile, int instance_id);
22
23 content::WebContents* embedder_web_contents() const {
24 return embedder_web_contents_;
25 }
26
27 content::WebContents* web_contents() const {
28 return WebContentsObserver::web_contents();
29 }
30
31 private:
32 virtual ~WebViewGuest();
33 virtual void WebContentsDestroyed(
34 content::WebContents* web_contents) OVERRIDE;
35
36 content::WebContents* embedder_web_contents_;
37 const std::string extension_id_;
38 const int embedder_render_process_id_;
39 // Profile and instance ID are cached here because |web_contents()| is
40 // null on destruction.
41 void* profile_;
42 const int instance_id_;
43
44 DISALLOW_COPY_AND_ASSIGN(WebViewGuest);
45 };
46
47 } // namespace chrome
48
49 #endif // CHROME_BROWSER_WEBVIEW_WEBVIEW_GUEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/event_router.cc ('k') | chrome/browser/webview/webview_guest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698