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

Side by Side Diff: trunk/src/chrome/browser/guestview/guestview.h

Issue 23965004: Revert 222090 "<webview>: Cleanup WebRequest event listeners whe..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 5 #ifndef CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
6 #define CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 6 #define CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/values.h" 10 #include "base/values.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 // Returns the extension ID of the embedder. 79 // Returns the extension ID of the embedder.
80 const std::string& extension_id() const { return extension_id_; } 80 const std::string& extension_id() const { return extension_id_; }
81 81
82 // Returns the user browser context of the embedder. 82 // Returns the user browser context of the embedder.
83 content::BrowserContext* browser_context() const { return browser_context_; } 83 content::BrowserContext* browser_context() const { return browser_context_; }
84 84
85 // Returns the embedder's process ID. 85 // Returns the embedder's process ID.
86 int embedder_render_process_id() const { return embedder_render_process_id_; } 86 int embedder_render_process_id() const { return embedder_render_process_id_; }
87 87
88 // Returns the embedder's routing ID.
89 int embedder_routing_id() const { return embedder_routing_id_; }
90
88 protected: 91 protected:
89 virtual ~GuestView(); 92 virtual ~GuestView();
90 93
91 // Dispatches an event |event_name| to the embedder with the |event| fields. 94 // Dispatches an event |event_name| to the embedder with the |event| fields.
92 void DispatchEvent(Event* event); 95 void DispatchEvent(Event* event);
93 96
94 private: 97 private:
95 void SendQueuedEvents(); 98 void SendQueuedEvents();
96 99
97 content::WebContents* guest_web_contents_; 100 content::WebContents* guest_web_contents_;
98 content::WebContents* embedder_web_contents_; 101 content::WebContents* embedder_web_contents_;
99 std::string extension_id_; 102 std::string extension_id_;
100 int embedder_render_process_id_; 103 int embedder_render_process_id_;
104 int embedder_routing_id_;
101 content::BrowserContext* browser_context_; 105 content::BrowserContext* browser_context_;
102 // |guest_instance_id_| is a profile-wide unique identifier for a guest 106 // |guest_instance_id_| is a profile-wide unique identifier for a guest
103 // WebContents. 107 // WebContents.
104 const int guest_instance_id_; 108 const int guest_instance_id_;
105 // |view_instance_id_| is an identifier that's unique within a particular 109 // |view_instance_id_| is an identifier that's unique within a particular
106 // embedder RenderViewHost for a particular <*view> instance. 110 // embedder RenderViewHost for a particular <*view> instance.
107 int view_instance_id_; 111 int view_instance_id_;
108 112
109 // This is a queue of Events that are destined to be sent to the embedder once 113 // This is a queue of Events that are destined to be sent to the embedder once
110 // the guest is attached to a particular embedder. 114 // the guest is attached to a particular embedder.
111 std::queue<Event*> pending_events_; 115 std::queue<Event*> pending_events_;
112 116
113 DISALLOW_COPY_AND_ASSIGN(GuestView); 117 DISALLOW_COPY_AND_ASSIGN(GuestView);
114 }; 118 };
115 119
116 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ 120 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/extensions/extension_renderer_state.h ('k') | trunk/src/chrome/browser/guestview/guestview.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698