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

Side by Side Diff: chrome/browser/guest_view/guest_view_base.h

Issue 347113002: Refactor PluginPermissionHelper as WebViewPermissionHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changes are made. Created 6 years, 5 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
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 #ifndef CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 5 #ifndef CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
7 7
8 #include <queue> 8 #include <queue>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 // BrowserPluginGuestDelegate implementation. 197 // BrowserPluginGuestDelegate implementation.
198 virtual void Destroy() OVERRIDE FINAL; 198 virtual void Destroy() OVERRIDE FINAL;
199 virtual void DidAttach() OVERRIDE FINAL; 199 virtual void DidAttach() OVERRIDE FINAL;
200 virtual int GetGuestInstanceID() const OVERRIDE; 200 virtual int GetGuestInstanceID() const OVERRIDE;
201 virtual void RegisterDestructionCallback( 201 virtual void RegisterDestructionCallback(
202 const DestructionCallback& callback) OVERRIDE FINAL; 202 const DestructionCallback& callback) OVERRIDE FINAL;
203 virtual void WillAttach( 203 virtual void WillAttach(
204 content::WebContents* embedder_web_contents, 204 content::WebContents* embedder_web_contents,
205 const base::DictionaryValue& extra_params) OVERRIDE FINAL; 205 const base::DictionaryValue& extra_params) OVERRIDE FINAL;
206 206
207 // Dispatches an event |event_name| to the embedder with the |event| fields.
208 void DispatchEventToEmbedder(Event* event);
209
207 protected: 210 protected:
208 GuestViewBase(content::BrowserContext* browser_context, 211 GuestViewBase(content::BrowserContext* browser_context,
209 int guest_instance_id); 212 int guest_instance_id);
210 213
211 virtual ~GuestViewBase(); 214 virtual ~GuestViewBase();
212 215
213 // Dispatches an event |event_name| to the embedder with the |event| fields.
214 void DispatchEvent(Event* event);
215
216 private: 216 private:
217 class EmbedderWebContentsObserver; 217 class EmbedderWebContentsObserver;
218 218
219 void SendQueuedEvents(); 219 void SendQueuedEvents();
220 220
221 void CompleteCreateWebContents(const std::string& embedder_extension_id, 221 void CompleteCreateWebContents(const std::string& embedder_extension_id,
222 int embedder_render_process_id, 222 int embedder_render_process_id,
223 const WebContentsCreatedCallback& callback, 223 const WebContentsCreatedCallback& callback,
224 content::WebContents* guest_web_contents); 224 content::WebContents* guest_web_contents);
225 225
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; 265 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_;
266 266
267 // This is used to ensure pending tasks will not fire after this object is 267 // This is used to ensure pending tasks will not fire after this object is
268 // destroyed. 268 // destroyed.
269 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; 269 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_;
270 270
271 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); 271 DISALLOW_COPY_AND_ASSIGN(GuestViewBase);
272 }; 272 };
273 273
274 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ 274 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698