Index: extensions/browser/guest_view/guest_view_manager_delegate.h |
diff --git a/extensions/browser/guest_view/guest_view_manager_delegate.h b/extensions/browser/guest_view/guest_view_manager_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..c17ba5e1732fab703ad33ebb0be16457f65a1e43 |
--- /dev/null |
+++ b/extensions/browser/guest_view/guest_view_manager_delegate.h |
@@ -0,0 +1,40 @@ |
+// Copyright 2015 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |
+#define EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |
+ |
+#include <string> |
+ |
+namespace extensions { |
+class GuestViewBase; |
+} // namespace extensions |
+ |
+namespace guestview { |
+ |
+// A GuestViewManagerDelegate interface allows GuestViewManager to delegate |
+// responsibilities to other modules in Chromium. Different builds of Chromium |
+// may use different GuestViewManagerDelegate implementations. For example, |
+// mobile builds of Chromium do not include an extensions module and so |
+// permission checks would be different, and IsOwnedByExtension would always |
+// return false. |
+class GuestViewManagerDelegate { |
+ public: |
+ virtual ~GuestViewManagerDelegate() {} |
+ |
+ // Indicates whether the |guest| can be used within the context of where it |
+ // was created. |
+ virtual bool IsGuestAvailableToContext(extensions::GuestViewBase* guest) = 0; |
+ |
+ // Indicates whether the |guest| is owned by an extension or Chrome App. |
+ virtual bool IsOwnedByExtension(extensions::GuestViewBase* guest) = 0; |
+ |
+ // Registers additional GuestView types the delegator (GuestViewManger) can |
+ // create. |
+ virtual void RegisterAdditionalGuestViewTypes() = 0; |
+}; |
+ |
+} // namespace guestview |
+ |
+#endif // EXTENSIONS_BROWSER_GUEST_VIEW_GUEST_VIEW_MANAGER_DELEGATE_H_ |