Index: content/public/browser/browser_plugin_guest_delegate_mode.h |
diff --git a/content/public/browser/browser_plugin_guest_delegate_mode.h b/content/public/browser/browser_plugin_guest_delegate_mode.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..0fd18405b79877899f66df3e7954fd0bffb53c57 |
--- /dev/null |
+++ b/content/public/browser/browser_plugin_guest_delegate_mode.h |
@@ -0,0 +1,39 @@ |
+// Copyright 2016 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 CONTENT_PUBLIC_COMMON_BROWSER_PLUGIN_GUEST_DELEGATE_MODE_H_ |
+#define CONTENT_PUBLIC_COMMON_BROWSER_PLUGIN_GUEST_DELEGATE_MODE_H_ |
lfg
2016/07/30 00:05:25
Update defines.
EhsanK
2016/09/01 21:51:47
Done.
|
+ |
+#include "base/macros.h" |
+#include "content/common/content_export.h" |
+ |
+namespace content { |
+ |
+class WebContents; |
+ |
+class CONTENT_EXPORT BrowserPluginGuestDelegateMode { |
lfg
2016/07/30 00:05:25
This name is confusing, it's not obvious what it m
EhsanK
2016/09/01 21:51:47
Done.
|
+ public: |
+ enum DelegateMode { |
lfg
2016/07/30 00:05:25
This seems overly complicated and doesn't add much
EhsanK
2016/09/01 21:51:47
Done.
|
+ /* The WebContents does not correspond to a guest. */ |
+ NONE, |
+ /* The WebContents is implemented using cross process frames. */ |
+ USING_CROSS_PROCESS_FRAMES, |
+ /* The WebContents is not using cross process frames, but it is a guest. */ |
+ NOT_USING_CROSS_PROCESS_FRAMES, |
+ }; |
+ |
+ // TODO(ekaramad): Remove the following method once MimeHandlerViewGuest uses |
+ // OOPIF (https://crbug.com/563285). |
+ // Returns the corresponding DelegateMode for the given |web_contents|. |
+ static DelegateMode DelegateModeFromWebContents(WebContents* web_contents); |
+ |
+ private: |
+ BrowserPluginGuestDelegateMode(); // Not instantiable |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestDelegateMode); |
+}; |
+ |
+} // namespace |
+ |
+#endif // CONTENT_PUBLIC_COMMON_BROWSER_PLUGIN_GUEST_DELEGATE_MODE_H_ |