| 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 EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| 6 #define CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 6 #define EXTENSIONS_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" |
| 11 #include "base/values.h" | 11 #include "base/values.h" |
| 12 #include "content/public/browser/browser_plugin_guest_delegate.h" | 12 #include "content/public/browser/browser_plugin_guest_delegate.h" |
| 13 #include "content/public/browser/render_process_host_observer.h" | 13 #include "content/public/browser/render_process_host_observer.h" |
| 14 #include "content/public/browser/web_contents.h" | 14 #include "content/public/browser/web_contents.h" |
| 15 #include "content/public/browser/web_contents_delegate.h" | 15 #include "content/public/browser/web_contents_delegate.h" |
| 16 #include "content/public/browser/web_contents_observer.h" | 16 #include "content/public/browser/web_contents_observer.h" |
| 17 | 17 |
| 18 struct RendererContentSettingRules; | 18 struct RendererContentSettingRules; |
| 19 | 19 |
| 20 namespace extensions { |
| 21 |
| 20 // A GuestViewBase is the base class browser-side API implementation for a | 22 // A GuestViewBase is the base class browser-side API implementation for a |
| 21 // <*view> tag. GuestViewBase maintains an association between a guest | 23 // <*view> tag. GuestViewBase maintains an association between a guest |
| 22 // WebContents and an embedder WebContents. It receives events issued from | 24 // WebContents and an embedder WebContents. It receives events issued from |
| 23 // the guest and relays them to the embedder. GuestViewBase tracks the lifetime | 25 // the guest and relays them to the embedder. GuestViewBase tracks the lifetime |
| 24 // of its embedder render process until it is attached to a particular embedder | 26 // of its embedder render process until it is attached to a particular embedder |
| 25 // WebContents. At that point, its lifetime is restricted in scope to the | 27 // WebContents. At that point, its lifetime is restricted in scope to the |
| 26 // lifetime of its embedder WebContents. | 28 // lifetime of its embedder WebContents. |
| 27 class GuestViewBase : public content::BrowserPluginGuestDelegate, | 29 class GuestViewBase : public content::BrowserPluginGuestDelegate, |
| 28 public content::RenderProcessHostObserver, | 30 public content::RenderProcessHostObserver, |
| 29 public content::WebContentsDelegate, | 31 public content::WebContentsDelegate, |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 // The minimum size constraints of the container element in autosize mode. | 323 // The minimum size constraints of the container element in autosize mode. |
| 322 gfx::Size min_auto_size_; | 324 gfx::Size min_auto_size_; |
| 323 | 325 |
| 324 // This is used to ensure pending tasks will not fire after this object is | 326 // This is used to ensure pending tasks will not fire after this object is |
| 325 // destroyed. | 327 // destroyed. |
| 326 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; | 328 base::WeakPtrFactory<GuestViewBase> weak_ptr_factory_; |
| 327 | 329 |
| 328 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); | 330 DISALLOW_COPY_AND_ASSIGN(GuestViewBase); |
| 329 }; | 331 }; |
| 330 | 332 |
| 331 #endif // CHROME_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ | 333 } // namespace extensions |
| 334 |
| 335 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_BASE_H_ |
| OLD | NEW |