IndexedDBFactory now ForceCloses databases.
[chromium-blink-merge.git] / content / renderer / browser_plugin / browser_plugin_manager_impl.h
bloba046995af638dea9e469053ad7e0c0827f02a21d
1 // Copyright (c) 2012 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.
5 #ifndef CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_
6 #define CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_
8 #include <map>
10 #include "content/renderer/browser_plugin/browser_plugin_manager.h"
11 #include "ui/gfx/size.h"
13 namespace gfx {
14 class Point;
17 namespace content {
19 class BrowserPluginManagerImpl : public BrowserPluginManager {
20 public:
21 explicit BrowserPluginManagerImpl(RenderViewImpl* render_view);
23 // BrowserPluginManager implementation.
24 virtual BrowserPlugin* CreateBrowserPlugin(
25 RenderViewImpl* render_view,
26 blink::WebFrame* frame) OVERRIDE;
27 virtual void AllocateInstanceID(
28 const base::WeakPtr<BrowserPlugin>& browser_plugin) OVERRIDE;
30 // IPC::Sender implementation.
31 virtual bool Send(IPC::Message* msg) OVERRIDE;
33 // RenderViewObserver override. Call on render thread.
34 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
35 virtual void DidCommitCompositorFrame() OVERRIDE;
37 private:
38 virtual ~BrowserPluginManagerImpl();
40 void OnAllocateInstanceIDACK(const IPC::Message& message,
41 int request_id,
42 int guest_instance_id);
43 void OnPluginAtPositionRequest(const IPC::Message& message,
44 int request_id,
45 const gfx::Point& position);
47 int request_id_counter_;
48 typedef std::map<int, const base::WeakPtr<BrowserPlugin> > InstanceIDMap;
49 InstanceIDMap pending_allocate_guest_instance_id_requests_;
51 DISALLOW_COPY_AND_ASSIGN(BrowserPluginManagerImpl);
54 } // namespace content
56 #endif // CONTENT_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_MANAGER_IMPL_H_