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

Side by Side Diff: chrome/browser/device_orientation/dispatcher_host.h

Issue 5698008: Switch a bunch of remaining filters to derive from BrowserMessageFilters so t... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years 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
« no previous file with comments | « no previous file | chrome/browser/device_orientation/dispatcher_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2010 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 CHROME_BROWSER_DEVICE_ORIENTATION_DISPATCHER_HOST_H_
6 #define CHROME_BROWSER_DEVICE_ORIENTATION_DISPATCHER_HOST_H_
7
8 #include <map>
9
10 #include "base/ref_counted.h"
11 #include "chrome/browser/device_orientation/provider.h"
12
13 namespace IPC { class Message; }
14
15 namespace device_orientation {
16
17 class Orientation;
18
19 class DispatcherHost : public base::RefCounted<DispatcherHost> {
20 public:
21 explicit DispatcherHost(int process_id);
22 bool OnMessageReceived(const IPC::Message& msg, bool* msg_was_ok);
23
24 private:
25 virtual ~DispatcherHost();
26 friend class base::RefCounted<DispatcherHost>;
27
28 void OnStartUpdating(int render_view_id);
29 void OnStopUpdating(int render_view_id);
30
31 // Helper class that observes a Provider and forwards updates to a RenderView.
32 class ObserverDelegate;
33
34 int process_id_;
35
36 // map from render_view_id to ObserverDelegate.
37 std::map<int, scoped_refptr<ObserverDelegate> > observers_map_;
38
39 scoped_refptr<Provider> provider_;
40
41 DISALLOW_COPY_AND_ASSIGN(DispatcherHost);
42 };
43
44 } // namespace device_orientation
45
46 #endif // CHROME_BROWSER_DEVICE_ORIENTATION_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/device_orientation/dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698