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

Side by Side Diff: content/browser/gamepad/gamepad_provider.cc

Issue 9514017: Cleanup: More random cleanup for gamepad code. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: revert content export removal Created 8 years, 9 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
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 #include <cmath> 5 #include <cmath>
6 #include <set> 6 #include <set>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/message_loop.h" 11 #include "base/message_loop.h"
12 #include "base/threading/thread.h" 12 #include "base/threading/thread.h"
13 #include "base/threading/thread_restrictions.h" 13 #include "base/threading/thread_restrictions.h"
14 #include "content/browser/gamepad/data_fetcher.h" 14 #include "content/browser/gamepad/data_fetcher.h"
15 #include "content/browser/gamepad/gamepad_provider.h" 15 #include "content/browser/gamepad/gamepad_provider.h"
16 #include "content/browser/gamepad/platform_data_fetcher.h" 16 #include "content/browser/gamepad/platform_data_fetcher.h"
17 #include "content/common/gamepad_hardware_buffer.h"
17 #include "content/common/gamepad_messages.h" 18 #include "content/common/gamepad_messages.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 20
20 namespace content { 21 namespace content {
21 22
22 GamepadProvider::GamepadProvider(GamepadDataFetcher* fetcher) 23 GamepadProvider::GamepadProvider(GamepadDataFetcher* fetcher)
23 : is_paused_(false), 24 : is_paused_(false),
24 devices_changed_(true), 25 devices_changed_(true),
25 provided_fetcher_(fetcher), 26 provided_fetcher_(fetcher),
26 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) { 27 ALLOW_THIS_IN_INITIALIZER_LIST(weak_factory_(this)) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 base::TimeDelta::FromMilliseconds(kDesiredSamplingIntervalMs)); 144 base::TimeDelta::FromMilliseconds(kDesiredSamplingIntervalMs));
144 } 145 }
145 146
146 GamepadHardwareBuffer* GamepadProvider::SharedMemoryAsHardwareBuffer() { 147 GamepadHardwareBuffer* GamepadProvider::SharedMemoryAsHardwareBuffer() {
147 void* mem = gamepad_shared_memory_.memory(); 148 void* mem = gamepad_shared_memory_.memory();
148 DCHECK(mem); 149 DCHECK(mem);
149 return static_cast<GamepadHardwareBuffer*>(mem); 150 return static_cast<GamepadHardwareBuffer*>(mem);
150 } 151 }
151 152
152 } // namespace content 153 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_provider.h ('k') | content/browser/gamepad/gamepad_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698