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

Side by Side Diff: content/browser/renderer_host/gamepad_browser_message_filter.h

Issue 2081583002: Migrating majority of gamepad from content/browser/ to device/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final tweaks Created 4 years, 5 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_ 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_ 6 #define CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/shared_memory.h" 10 #include "base/memory/shared_memory.h"
11 #include "content/browser/gamepad/gamepad_consumer.h"
12 #include "content/public/browser/browser_message_filter.h" 11 #include "content/public/browser/browser_message_filter.h"
12 #include "device/gamepad/gamepad_consumer.h"
13
14 namespace device {
15
16 class GamepadService;
17
18 }
13 19
14 namespace content { 20 namespace content {
15 21
16 class GamepadService;
17 class RenderProcessHost; 22 class RenderProcessHost;
18 23
19 class GamepadBrowserMessageFilter : 24 class GamepadBrowserMessageFilter :
20 public BrowserMessageFilter, 25 public BrowserMessageFilter,
21 public GamepadConsumer { 26 public device::GamepadConsumer {
22 public: 27 public:
23 GamepadBrowserMessageFilter(); 28 GamepadBrowserMessageFilter();
24 29
25 // BrowserMessageFilter implementation. 30 // BrowserMessageFilter implementation.
26 bool OnMessageReceived(const IPC::Message& message) override; 31 bool OnMessageReceived(const IPC::Message& message) override;
27 32
28 // GamepadConsumer implementation. 33 // GamepadConsumer implementation.
29 void OnGamepadConnected(unsigned index, 34 void OnGamepadConnected(unsigned index,
30 const blink::WebGamepad& gamepad) override; 35 const blink::WebGamepad& gamepad) override;
31 void OnGamepadDisconnected(unsigned index, 36 void OnGamepadDisconnected(unsigned index,
32 const blink::WebGamepad& gamepad) override; 37 const blink::WebGamepad& gamepad) override;
33 38
34 private: 39 private:
35 ~GamepadBrowserMessageFilter() override; 40 ~GamepadBrowserMessageFilter() override;
36 41
37 void OnGamepadStartPolling(base::SharedMemoryHandle* renderer_handle); 42 void OnGamepadStartPolling(base::SharedMemoryHandle* renderer_handle);
38 void OnGamepadStopPolling(); 43 void OnGamepadStopPolling();
39 44
40 bool is_started_; 45 bool is_started_;
41 46
42 DISALLOW_COPY_AND_ASSIGN(GamepadBrowserMessageFilter); 47 DISALLOW_COPY_AND_ASSIGN(GamepadBrowserMessageFilter);
43 }; 48 };
44 49
45 } // namespace content 50 } // namespace content
46 51
47 #endif // CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_ 52 #endif // CONTENT_BROWSER_RENDERER_HOST_GAMEPAD_BROWSER_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « content/browser/gamepad/xbox_data_fetcher_mac.cc ('k') | content/browser/renderer_host/pepper/pepper_gamepad_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698