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

Side by Side Diff: content/renderer/gamepad_shared_memory_reader.h

Issue 670683003: Standardize usage of virtual/override/final in content/renderer/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 5 #ifndef CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 6 #define CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/memory/shared_memory.h" 9 #include "base/memory/shared_memory.h"
10 #include "content/common/gamepad_messages.h" 10 #include "content/common/gamepad_messages.h"
11 #include "content/public/renderer/renderer_gamepad_provider.h" 11 #include "content/public/renderer/renderer_gamepad_provider.h"
12 #include "third_party/WebKit/public/platform/WebGamepads.h" 12 #include "third_party/WebKit/public/platform/WebGamepads.h"
13 13
14 namespace content { 14 namespace content {
15 15
16 struct GamepadHardwareBuffer; 16 struct GamepadHardwareBuffer;
17 17
18 class GamepadSharedMemoryReader : public RendererGamepadProvider { 18 class GamepadSharedMemoryReader : public RendererGamepadProvider {
19 public: 19 public:
20 explicit GamepadSharedMemoryReader(RenderThread* thread); 20 explicit GamepadSharedMemoryReader(RenderThread* thread);
21 virtual ~GamepadSharedMemoryReader(); 21 ~GamepadSharedMemoryReader() override;
22 22
23 // RendererGamepadProvider implementation. 23 // RendererGamepadProvider implementation.
24 virtual void SampleGamepads( 24 void SampleGamepads(blink::WebGamepads& gamepads) override;
25 blink::WebGamepads& gamepads) override; 25 bool OnControlMessageReceived(const IPC::Message& message) override;
26 virtual bool OnControlMessageReceived(const IPC::Message& message) override; 26 void Start(blink::WebPlatformEventListener* listener) override;
27 virtual void Start(blink::WebPlatformEventListener* listener) override;
28 27
29 protected: 28 protected:
30 // PlatformEventObserver protected methods. 29 // PlatformEventObserver protected methods.
31 virtual void SendStartMessage() override; 30 void SendStartMessage() override;
32 virtual void SendStopMessage() override; 31 void SendStopMessage() override;
33 32
34 private: 33 private:
35 void OnGamepadConnected(int index, const blink::WebGamepad& gamepad); 34 void OnGamepadConnected(int index, const blink::WebGamepad& gamepad);
36 void OnGamepadDisconnected(int index, const blink::WebGamepad& gamepad); 35 void OnGamepadDisconnected(int index, const blink::WebGamepad& gamepad);
37 36
38 base::SharedMemoryHandle renderer_shared_memory_handle_; 37 base::SharedMemoryHandle renderer_shared_memory_handle_;
39 scoped_ptr<base::SharedMemory> renderer_shared_memory_; 38 scoped_ptr<base::SharedMemory> renderer_shared_memory_;
40 GamepadHardwareBuffer* gamepad_hardware_buffer_; 39 GamepadHardwareBuffer* gamepad_hardware_buffer_;
41 40
42 bool ever_interacted_with_; 41 bool ever_interacted_with_;
43 42
44 DISALLOW_COPY_AND_ASSIGN(GamepadSharedMemoryReader); 43 DISALLOW_COPY_AND_ASSIGN(GamepadSharedMemoryReader);
45 }; 44 };
46 45
47 } // namespace content 46 } // namespace content
48 47
49 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_ 48 #endif // CONTENT_RENDERER_GAMEPAD_SHARED_MEMORY_READER_H_
OLDNEW
« no previous file with comments | « content/renderer/fetchers/resource_fetcher_impl.h ('k') | content/renderer/geolocation_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698