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_APP_VIEW_APP_VIEW_GUEST_H_ | 5 #ifndef CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
6 #define CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ | 6 #define CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
7 | 7 |
8 #include "base/id_map.h" | 8 #include "base/id_map.h" |
9 #include "chrome/browser/guest_view/guest_view.h" | |
10 #include "extensions/browser/extension_function_dispatcher.h" | 9 #include "extensions/browser/extension_function_dispatcher.h" |
| 10 #include "extensions/browser/guest_view/guest_view.h" |
11 | 11 |
12 namespace extensions { | 12 namespace extensions { |
13 class Extension; | 13 class Extension; |
14 class ExtensionHost; | 14 class ExtensionHost; |
15 }; | |
16 | 15 |
17 // An AppViewGuest provides the browser-side implementation of <appview> API. | 16 // An AppViewGuest provides the browser-side implementation of <appview> API. |
18 // AppViewGuest is created on attachment. That is, when a guest WebContents is | 17 // AppViewGuest is created on attachment. That is, when a guest WebContents is |
19 // associated with a particular embedder WebContents. This happens on calls to | 18 // associated with a particular embedder WebContents. This happens on calls to |
20 // the connect API. | 19 // the connect API. |
21 class AppViewGuest : public GuestView<AppViewGuest>, | 20 class AppViewGuest : public GuestView<AppViewGuest>, |
22 public extensions::ExtensionFunctionDispatcher::Delegate { | 21 public extensions::ExtensionFunctionDispatcher::Delegate { |
23 public: | 22 public: |
24 static const char Type[]; | 23 static const char Type[]; |
25 | 24 |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 scoped_ptr<extensions::ExtensionFunctionDispatcher> | 75 scoped_ptr<extensions::ExtensionFunctionDispatcher> |
77 extension_function_dispatcher_; | 76 extension_function_dispatcher_; |
78 | 77 |
79 // This is used to ensure pending tasks will not fire after this object is | 78 // This is used to ensure pending tasks will not fire after this object is |
80 // destroyed. | 79 // destroyed. |
81 base::WeakPtrFactory<AppViewGuest> weak_ptr_factory_; | 80 base::WeakPtrFactory<AppViewGuest> weak_ptr_factory_; |
82 | 81 |
83 DISALLOW_COPY_AND_ASSIGN(AppViewGuest); | 82 DISALLOW_COPY_AND_ASSIGN(AppViewGuest); |
84 }; | 83 }; |
85 | 84 |
| 85 } // namespace extensions |
| 86 |
86 #endif // CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ | 87 #endif // CHROME_BROWSER_GUEST_VIEW_APP_VIEW_APP_VIEW_GUEST_H_ |
OLD | NEW |