OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |
| 6 #define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 namespace extensions { |
| 11 class GuestViewBase; |
| 12 } // namespace extensions |
| 13 |
| 14 namespace guestview { |
| 15 |
| 16 // A GuestViewManagerDelegate interface allows GuestViewManager to delegate |
| 17 // responsibilities to other modules in Chromium. Different builds of Chromium |
| 18 // may use different GuestViewManagerDelegate implementations. For example, |
| 19 // mobile builds of Chromium do not include an extensions module and so |
| 20 // permission checks would be different, and IsOwnedByExtension would always |
| 21 // return false. |
| 22 class GuestViewManagerDelegate { |
| 23 public: |
| 24 virtual ~GuestViewManagerDelegate() {} |
| 25 |
| 26 // Indicates whether the |guest| can be used within the context of where it |
| 27 // was created. |
| 28 virtual bool IsGuestAvailableToContext(extensions::GuestViewBase* guest) = 0; |
| 29 |
| 30 // Indicates whether the |guest| is owned by an extension or Chrome App. |
| 31 virtual bool IsOwnedByExtension(extensions::GuestViewBase* guest) = 0; |
| 32 |
| 33 // Registers additional GuestView types the delegator (GuestViewManger) can |
| 34 // create. |
| 35 virtual void RegisterAdditionalGuestViewTypes() = 0; |
| 36 }; |
| 37 |
| 38 } // namespace guestview |
| 39 |
| 40 #endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |
OLD | NEW |