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

Side by Side Diff: extensions/browser/guest_view/guest_view_event.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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2015 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 EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_EVENT_H_
6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_EVENT_H_
7
8 #include <string>
9
10 #include "base/memory/scoped_ptr.h"
11 #include "base/values.h"
12
13 namespace extensions {
14
15 class GuestViewBase;
16
17 // A GuestViewEvent is a wrapper class for an extension event.
18 // GuestViewEvents may be queued until the guest is attached to a conatiner.
19 // This wrapper class holds all the necessary information to fire the event
20 // on attachment. GuestViewEvents are owned by GuestViewBase.
21 class GuestViewEvent {
22 public:
23 GuestViewEvent(const std::string& name,
24 scoped_ptr<base::DictionaryValue> args);
25 ~GuestViewEvent();
26
27 // This method will dispatch the event to the specified |guest|'s embedder and
28 // use the provided |instance_id| for routing. After dispatch, this object
29 // will self-destruct.
30 void Dispatch(GuestViewBase* guest, int instance_id);
31
32 private:
33 const std::string name_;
34 scoped_ptr<base::DictionaryValue> args_;
35
36 DISALLOW_COPY_AND_ASSIGN(GuestViewEvent);
37 };
38
39 } // namespace extensions
40
41 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_EVENT_H_
OLDNEW
« no previous file with comments | « extensions/browser/guest_view/guest_view_base.cc ('k') | extensions/browser/guest_view/guest_view_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698