| 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/memory/weak_ptr.h" |
| 10 #include "base/values.h" | 11 #include "base/values.h" |
| 11 #include "content/public/browser/browser_plugin_guest_delegate.h" | 12 #include "content/public/browser/browser_plugin_guest_delegate.h" |
| 12 #include "content/public/browser/web_contents.h" | 13 #include "content/public/browser/web_contents.h" |
| 13 | 14 |
| 14 class AdViewGuest; | 15 class AdViewGuest; |
| 15 class WebViewGuest; | 16 class WebViewGuest; |
| 16 struct RendererContentSettingRules; | 17 struct RendererContentSettingRules; |
| 17 | 18 |
| 18 // A GuestView is the base class browser-side API implementation for a <*view> | 19 // A GuestView is the base class browser-side API implementation for a <*view> |
| 19 // tag. GuestView maintains an association between a guest WebContents and an | 20 // tag. GuestView maintains an association between a guest WebContents and an |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 125 // WebContents. | 126 // WebContents. |
| 126 const int guest_instance_id_; | 127 const int guest_instance_id_; |
| 127 // |view_instance_id_| is an identifier that's unique within a particular | 128 // |view_instance_id_| is an identifier that's unique within a particular |
| 128 // embedder RenderViewHost for a particular <*view> instance. | 129 // embedder RenderViewHost for a particular <*view> instance. |
| 129 int view_instance_id_; | 130 int view_instance_id_; |
| 130 | 131 |
| 131 // This is a queue of Events that are destined to be sent to the embedder once | 132 // 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. | 133 // the guest is attached to a particular embedder. |
| 133 std::queue<Event*> pending_events_; | 134 std::queue<Event*> pending_events_; |
| 134 | 135 |
| 136 // This is used to ensure pending tasks will not fire after this object is |
| 137 // destroyed. |
| 138 base::WeakPtrFactory<GuestView> weak_ptr_factory_; |
| 139 |
| 135 DISALLOW_COPY_AND_ASSIGN(GuestView); | 140 DISALLOW_COPY_AND_ASSIGN(GuestView); |
| 136 }; | 141 }; |
| 137 | 142 |
| 138 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ | 143 #endif // CHROME_BROWSER_GUESTVIEW_GUESTVIEW_H_ |
| OLD | NEW |