OLD | NEW |
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 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 GuestViewBase* GetOpener() const { | 120 GuestViewBase* GetOpener() const { |
121 return opener_.get(); | 121 return opener_.get(); |
122 } | 122 } |
123 | 123 |
124 void SetOpener(GuestViewBase* opener); | 124 void SetOpener(GuestViewBase* opener); |
125 | 125 |
126 // BrowserPluginGuestDelegate implementation. | 126 // BrowserPluginGuestDelegate implementation. |
127 virtual void Destroy() OVERRIDE; | 127 virtual void Destroy() OVERRIDE; |
128 virtual void RegisterDestructionCallback( | 128 virtual void RegisterDestructionCallback( |
129 const DestructionCallback& callback) OVERRIDE; | 129 const DestructionCallback& callback) OVERRIDE; |
| 130 virtual bool PreHandleGestureEvent( |
| 131 content::WebContents* source, |
| 132 const blink::WebGestureEvent& event) OVERRIDE; |
130 | 133 |
131 protected: | 134 protected: |
132 GuestViewBase(int guest_instance_id, | 135 GuestViewBase(int guest_instance_id, |
133 content::WebContents* guest_web_contents, | 136 content::WebContents* guest_web_contents, |
134 const std::string& embedder_extension_id); | 137 const std::string& embedder_extension_id); |
135 virtual ~GuestViewBase(); | 138 virtual ~GuestViewBase(); |
136 | 139 |
137 // Dispatches an event |event_name| to the embedder with the |event| fields. | 140 // Dispatches an event |event_name| to the embedder with the |event| fields. |
138 void DispatchEvent(Event* event); | 141 void DispatchEvent(Event* event); |
139 | 142 |
(...skipping 28 matching lines...) Expand all Loading... |
168 scoped_ptr<base::DictionaryValue> extra_params_; | 171 scoped_ptr<base::DictionaryValue> extra_params_; |
169 | 172 |
170 // This is used to ensure pending tasks will not fire after this object is | 173 // This is used to ensure pending tasks will not fire after this object is |
171 // destroyed. | 174 // destroyed. |
172 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 175 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
173 | 176 |
174 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 177 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
175 }; | 178 }; |
176 | 179 |
177 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 180 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
OLD | NEW |