Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3616)

Unified Diff: chrome/browser/guest_view/chrome_guest_view_manager_delegate.h

Issue 1602663003: Framelet Prototype 2016 using Mojo IPC Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Disabled oilpan Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/guest_view/chrome_guest_view_manager_delegate.h
diff --git a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h
index 447a34bb4c4748253562e100961ebf6bff761728..ebf92f35e8f6c28fddeeb31a50654f62517ae543 100644
--- a/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h
+++ b/chrome/browser/guest_view/chrome_guest_view_manager_delegate.h
@@ -5,28 +5,47 @@
#ifndef CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MANAGER_DELEGATE_H_
#define CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MANAGER_DELEGATE_H_
-#include "base/macros.h"
-#include "extensions/browser/guest_view/extensions_guest_view_manager_delegate.h"
+#include "components/guest_view/browser/guest_view_manager_delegate.h"
+#include "content/public/browser/browser_context.h"
-namespace extensions {
+#if defined(ENABLE_EXTENSIONS)
+#include "chrome/browser/guest_view/chrome_extensions_guest_view_manager_delegate.h"
+#endif // defined(ENABLE_EXTENSIONS)
-// Defines a chrome-specific implementation of
-// ExtensionsGuestViewManagerDelegate that knows about the concept of a task
-// manager and the need for tagging the guest view WebContents by their
-// appropriate task manager tag.
-class ChromeGuestViewManagerDelegate
- : public ExtensionsGuestViewManagerDelegate {
+namespace chrome {
+
+#if defined(ENABLE_EXTENSIONS)
+using GuestViewManagerDelegateBase =
+ extensions::ChromeExtensionsGuestViewManagerDelegate;
+#else
+using GuestViewManagerDelegateBase = guest_view::GuestViewManagerDelegate;
+#endif // defined(ENABLE_EXTENSIONS)
+
+// Defines a chrome-specific implementation of GuestViewManagerDelegate.
+class ChromeGuestViewManagerDelegate : public GuestViewManagerDelegateBase {
public:
- explicit ChromeGuestViewManagerDelegate(content::BrowserContext* context);
+ static guest_view::GuestViewManagerDelegate* Create(
+ content::BrowserContext* context);
~ChromeGuestViewManagerDelegate() override;
- // GuestViewManagerDelegate:
- void OnGuestAdded(content::WebContents* guest_web_contents) const override;
+ // GuestViewManagerDelegate implementation.
+ void DispatchEvent(const std::string& event_name,
+ scoped_ptr<base::DictionaryValue> args,
+ guest_view::GuestViewBase* guest,
+ int instance_id) override;
+ bool IsGuestAvailableToContext(guest_view::GuestViewBase* guest) override;
+ void RegisterAdditionalGuestViewTypes() override;
private:
+ explicit ChromeGuestViewManagerDelegate(content::BrowserContext* context);
+
+#if !defined(ENABLE_EXTENSIONS)
+ content::BrowserContext* const context_;
+#endif
+
DISALLOW_COPY_AND_ASSIGN(ChromeGuestViewManagerDelegate);
};
-} // namespace extensions
+} // namespace chrome
#endif // CHROME_BROWSER_GUEST_VIEW_CHROME_GUEST_VIEW_MANAGER_DELEGATE_H_

Powered by Google App Engine
This is Rietveld 408576698