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

Unified Diff: extensions/browser/guest_view/guest_view_base.h

Issue 1087123002: Towards Decoupling GuestView from Extensions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed lazyboy@'s comments. Removed unnecessary includes. Simplified GuestViewEvent. Created 5 years, 8 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
Index: extensions/browser/guest_view/guest_view_base.h
diff --git a/extensions/browser/guest_view/guest_view_base.h b/extensions/browser/guest_view/guest_view_base.h
index cc22488cace2367f40be8e92780ecd7f8d96f73f..287796360b938c4b7c882d82913879849e917e8b 100644
--- a/extensions/browser/guest_view/guest_view_base.h
+++ b/extensions/browser/guest_view/guest_view_base.h
@@ -22,6 +22,8 @@ struct RendererContentSettingRules;
namespace extensions {
+class GuestViewEvent;
+
// A struct of parameters for SetSize(). The parameters are all declared as
// scoped pointers since they are all optional. Null pointers indicate that the
// parameter has not been provided, and the last used value should be used. Note
@@ -49,20 +51,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
public content::WebContentsObserver,
public ui_zoom::ZoomObserver {
public:
- class Event {
- public:
- Event(const std::string& name, scoped_ptr<base::DictionaryValue> args);
- ~Event();
-
- const std::string& name() const { return name_; }
-
- scoped_ptr<base::DictionaryValue> GetArguments();
-
- private:
- const std::string name_;
- scoped_ptr<base::DictionaryValue> args_;
- };
-
// Returns a *ViewGuest if this GuestView is of the given view type.
template <typename T>
T* As() {
@@ -306,10 +294,10 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
const ui_zoom::ZoomController::ZoomChangedEventData& data) final;
// Dispatches an event to the guest proxy.
- void DispatchEventToGuestProxy(Event* event);
+ void DispatchEventToGuestProxy(GuestViewEvent* event);
// Dispatches an event to the view.
- void DispatchEventToView(Event* event);
+ void DispatchEventToView(GuestViewEvent* event);
protected:
explicit GuestViewBase(content::WebContents* owner_web_contents);
@@ -370,8 +358,6 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
class OpenerLifetimeObserver;
- void DispatchEvent(Event* event, int instance_id);
-
void SendQueuedEvents();
void CompleteInit(scoped_ptr<base::DictionaryValue> create_params,
@@ -423,7 +409,7 @@ class GuestViewBase : public content::BrowserPluginGuestDelegate,
// This is a queue of Events that are destined to be sent to the embedder once
// the guest is attached to a particular embedder.
- std::deque<linked_ptr<Event> > pending_events_;
+ std::deque<linked_ptr<GuestViewEvent> > pending_events_;
// The opener guest view.
base::WeakPtr<GuestViewBase> opener_;
« no previous file with comments | « extensions/browser/guest_view/extension_view/extension_view_guest.cc ('k') | extensions/browser/guest_view/guest_view_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698