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

Side by Side Diff: content/public/renderer/browser_plugin/browser_plugin_observer.h

Issue 11826005: Browser Plugin: Implement BrowserPluginObserver. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
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.
4
5 #ifndef CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_OBSERVER_H_
6 #define CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_OBSERVER_H_
7
8 #include "base/compiler_specific.h"
9 #include "content/common/content_export.h"
10 #include "ipc/ipc_listener.h"
11 #include "ipc/ipc_sender.h"
12
13 namespace content {
14
15 class BrowserPlugin;
16 class BrowserPluginImpl;
17
18 class CONTENT_EXPORT BrowserPluginObserver : public IPC::Listener,
sadrul 2013/01/09 15:21:54 It looks like a BPO can be an observer for a singl
Fady Samuel 2013/01/09 17:41:24 Done.
19 public IPC::Sender {
20 public:
21 // By default, observers will be deleted when the BrowserPlugin goes away. If
22 // they want to outlive it, they can override this function.
23 virtual void OnDestruct();
24
25 // IPC::Listener implementation.
26 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
27
28 protected:
29 explicit BrowserPluginObserver(BrowserPlugin* browser_plugin);
30 virtual ~BrowserPluginObserver();
31
32 // IPC::Sender implementation.
33 virtual bool Send(IPC::Message* message) OVERRIDE;
34
35 BrowserPlugin* browser_plugin() const;
36 int instance_id() { return instance_id_; }
sadrul 2013/01/09 15:21:54 const this too?
Fady Samuel 2013/01/09 17:41:24 Done.
37
38 private:
39 friend class BrowserPluginImpl;
40
41 // This is called by the BrowserPlugin when it's going away so that this
42 // object can null out its pointer.
43 void BrowserPluginGone();
44
45 BrowserPlugin* browser_plugin_;
46 // The instance ID of the associated BrowserPlugin.
47 int instance_id_;
48
49 DISALLOW_COPY_AND_ASSIGN(BrowserPluginObserver);
50
sadrul 2013/01/09 15:21:54 remove blank line
Fady Samuel 2013/01/09 17:41:24 Done.
51 };
52
53 } // namespace content
54
55 #endif // CONTENT_PUBLIC_RENDERER_BROWSER_PLUGIN_BROWSER_PLUGIN_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698