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

Unified Diff: content/browser/browser_plugin/browser_plugin_guest_manager.h

Issue 269113002: Remove BrowserPluginGuestManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@guestview_manager_createguest
Patch Set: Created 6 years, 7 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: content/browser/browser_plugin/browser_plugin_guest_manager.h
diff --git a/content/browser/browser_plugin/browser_plugin_guest_manager.h b/content/browser/browser_plugin/browser_plugin_guest_manager.h
deleted file mode 100644
index fa60235f7787bc9a5afdb6d8916ac5a91d5d05ee..0000000000000000000000000000000000000000
--- a/content/browser/browser_plugin/browser_plugin_guest_manager.h
+++ /dev/null
@@ -1,107 +0,0 @@
-// Copyright 2013 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.
-
-// A BrowserPluginGuestManager serves as a message router to BrowserPluginGuests
-// for all guests within a given profile.
-// Messages are routed to a particular guest instance based on an instance_id.
-
-#ifndef CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_
-#define CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_
-
-#include "base/basictypes.h"
-#include "base/supports_user_data.h"
-#include "base/values.h"
-#include "content/common/content_export.h"
-#include "content/public/browser/browser_plugin_guest_manager_delegate.h"
-#include "ipc/ipc_message.h"
-
-struct BrowserPluginHostMsg_Attach_Params;
-struct BrowserPluginHostMsg_ResizeGuest_Params;
-class GURL;
-
-namespace gfx {
-class Point;
-}
-
-namespace IPC {
-class Message;
-} // namespace IPC
-
-namespace content {
-
-class BrowserContext;
-class BrowserPluginGuest;
-class BrowserPluginHostFactory;
-class RenderWidgetHostImpl;
-class SiteInstance;
-class WebContents;
-
-// WARNING: All APIs should be guarded with a process ID check like
-// CanEmbedderAccessInstanceIDMaybeKill, to prevent abuse by normal renderer
-// processes.
-class CONTENT_EXPORT BrowserPluginGuestManager :
- public base::SupportsUserData::Data {
- public:
- virtual ~BrowserPluginGuestManager();
-
- static BrowserPluginGuestManager* FromBrowserContext(BrowserContext* context);
-
- BrowserPluginGuestManagerDelegate* GetDelegate() const;
-
- static BrowserPluginGuestManager* Create(BrowserContext* context);
-
- // Overrides factory for testing. Default (NULL) value indicates regular
- // (non-test) environment.
- static void set_factory_for_testing(BrowserPluginHostFactory* factory) {
- content::BrowserPluginGuestManager::factory_ = factory;
- }
-
- // Gets the next available instance id. 0 is considered an invalid instance
- // ID.
- int GetNextInstanceID();
-
- // Creates a guest WebContents with the provided |instance_id| and |params|.
- // If params.src is present, the new guest will also be navigated to the
- // provided URL. Optionally, the new guest may be attached to a
- // |guest_opener|, and may be attached to a pre-selected |routing_id|.
- virtual BrowserPluginGuest* CreateGuest(
- SiteInstance* embedder_site_instance,
- int instance_id,
- const StorageInfo& storage_info,
- scoped_ptr<base::DictionaryValue> extra_params);
-
- typedef base::Callback<void(BrowserPluginGuest*)> GuestByInstanceIDCallback;
- void MaybeGetGuestByInstanceIDOrKill(
- int instance_id,
- int embedder_render_process_id,
- const GuestByInstanceIDCallback& callback) const;
-
- typedef base::Callback<bool(BrowserPluginGuest*)> GuestCallback;
- bool ForEachGuest(WebContents* embedder_web_contents,
- const GuestCallback& callback);
-
- void OnMessageReceived(const IPC::Message& message, int render_process_id);
-
- private:
- friend class TestBrowserPluginGuestManager;
-
- explicit BrowserPluginGuestManager(BrowserContext* context);
-
- // Static factory instance (always NULL outside of tests).
- static BrowserPluginHostFactory* factory_;
-
- // The BrowserContext in which this manager this stored.
- BrowserContext* context_;
-
- // Contains guests' WebContents, mapping from their instance ids.
- typedef std::map<int, WebContents*> GuestInstanceMap;
- GuestInstanceMap guest_web_contents_by_instance_id_;
- int next_instance_id_;
-
- DISALLOW_COPY_AND_ASSIGN(BrowserPluginGuestManager);
-};
-
-} // namespace content
-
-#endif // CONTENT_BROWSER_BROWSER_PLUGIN_BROWSER_PLUGIN_GUEST_MANAGER_H_

Powered by Google App Engine
This is Rietveld 408576698