| OLD | NEW |
| 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 11 matching lines...) Expand all Loading... |
| 22 class GuestView : public content::BrowserPluginGuestDelegate { | 22 class GuestView : public content::BrowserPluginGuestDelegate { |
| 23 public: | 23 public: |
| 24 enum Type { | 24 enum Type { |
| 25 WEBVIEW, | 25 WEBVIEW, |
| 26 ADVIEW, | 26 ADVIEW, |
| 27 UNKNOWN | 27 UNKNOWN |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 class Event { | 30 class Event { |
| 31 public: | 31 public: |
| 32 Event(const std::string& name, scoped_ptr<DictionaryValue> args); | 32 Event(const std::string& name, scoped_ptr<base::DictionaryValue> args); |
| 33 ~Event(); | 33 ~Event(); |
| 34 | 34 |
| 35 const std::string& name() const { return name_; } | 35 const std::string& name() const { return name_; } |
| 36 | 36 |
| 37 scoped_ptr<DictionaryValue> GetArguments(); | 37 scoped_ptr<base::DictionaryValue> GetArguments(); |
| 38 | 38 |
| 39 private: | 39 private: |
| 40 const std::string name_; | 40 const std::string name_; |
| 41 scoped_ptr<DictionaryValue> args_; | 41 scoped_ptr<base::DictionaryValue> args_; |
| 42 }; | 42 }; |
| 43 | 43 |
| 44 static Type GetViewTypeFromString(const std::string& api_type); | 44 static Type GetViewTypeFromString(const std::string& api_type); |
| 45 | 45 |
| 46 static GuestView* Create(content::WebContents* guest_web_contents, | 46 static GuestView* Create(content::WebContents* guest_web_contents, |
| 47 const std::string& extension_id, | 47 const std::string& extension_id, |
| 48 Type view_type); | 48 Type view_type); |
| 49 | 49 |
| 50 static GuestView* FromWebContents(content::WebContents* web_contents); | 50 static GuestView* FromWebContents(content::WebContents* web_contents); |
| 51 | 51 |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 int view_instance_id_; | 129 int view_instance_id_; |
| 130 | 130 |
| 131 // This is a queue of Events that are destined to be sent to the embedder once | 131 // This is a queue of Events that are destined to be sent to the embedder once |
| 132 // the guest is attached to a particular embedder. | 132 // the guest is attached to a particular embedder. |
| 133 std::queue<Event*> pending_events_; | 133 std::queue<Event*> pending_events_; |
| 134 | 134 |
| 135 DISALLOW_COPY_AND_ASSIGN(GuestView); | 135 DISALLOW_COPY_AND_ASSIGN(GuestView); |
| 136 }; | 136 }; |
| 137 | 137 |
| 138 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ | 138 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ |
| OLD | NEW |