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 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
211 GuestViewBase(content::BrowserContext* browser_context, | 211 GuestViewBase(content::BrowserContext* browser_context, |
212 int guest_instance_id); | 212 int guest_instance_id); |
213 | 213 |
214 virtual ~GuestViewBase(); | 214 virtual ~GuestViewBase(); |
215 | 215 |
216 private: | 216 private: |
217 class EmbedderWebContentsObserver; | 217 class EmbedderWebContentsObserver; |
218 | 218 |
219 void SendQueuedEvents(); | 219 void SendQueuedEvents(); |
220 | 220 |
221 void CompleteCreateWebContents(const std::string& embedder_extension_id, | 221 void CompleteInit(const std::string& embedder_extension_id, |
222 int embedder_render_process_id, | 222 int embedder_render_process_id, |
223 const WebContentsCreatedCallback& callback, | 223 const WebContentsCreatedCallback& callback, |
224 content::WebContents* guest_web_contents); | 224 content::WebContents* guest_web_contents); |
225 | 225 |
226 // WebContentsObserver implementation. | 226 // WebContentsObserver implementation. |
227 virtual void DidStopLoading( | 227 virtual void DidStopLoading( |
228 content::RenderViewHost* render_view_host) OVERRIDE FINAL; | 228 content::RenderViewHost* render_view_host) OVERRIDE FINAL; |
229 virtual void WebContentsDestroyed() OVERRIDE FINAL; | 229 virtual void WebContentsDestroyed() OVERRIDE FINAL; |
230 | 230 |
231 // WebContentsDelegate implementation. | 231 // WebContentsDelegate implementation. |
232 virtual bool ShouldFocusPageAfterCrash() OVERRIDE FINAL; | 232 virtual bool ShouldFocusPageAfterCrash() OVERRIDE FINAL; |
233 virtual bool PreHandleGestureEvent( | 233 virtual bool PreHandleGestureEvent( |
234 content::WebContents* source, | 234 content::WebContents* source, |
(...skipping 30 matching lines...) Expand all Loading... |
265 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; | 265 scoped_ptr<EmbedderWebContentsObserver> embedder_web_contents_observer_; |
266 | 266 |
267 // This is used to ensure pending tasks will not fire after this object is | 267 // This is used to ensure pending tasks will not fire after this object is |
268 // destroyed. | 268 // destroyed. |
269 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 269 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
270 | 270 |
271 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 271 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
272 }; | 272 }; |
273 | 273 |
274 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 274 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
OLD | NEW |