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

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

Issue 63253002: Rename WebKit namespace to blink (part 3) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
151 void GamepadProvider::DoPoll() { 151 void GamepadProvider::DoPoll() {
152 DCHECK(base::MessageLoop::current() == polling_thread_->message_loop()); 152 DCHECK(base::MessageLoop::current() == polling_thread_->message_loop());
153 DCHECK(have_scheduled_do_poll_); 153 DCHECK(have_scheduled_do_poll_);
154 have_scheduled_do_poll_ = false; 154 have_scheduled_do_poll_ = false;
155 155
156 bool changed; 156 bool changed;
157 GamepadHardwareBuffer* hwbuf = SharedMemoryAsHardwareBuffer(); 157 GamepadHardwareBuffer* hwbuf = SharedMemoryAsHardwareBuffer();
158 158
159 ANNOTATE_BENIGN_RACE_SIZED( 159 ANNOTATE_BENIGN_RACE_SIZED(
160 &hwbuf->buffer, 160 &hwbuf->buffer,
161 sizeof(WebKit::WebGamepads), 161 sizeof(blink::WebGamepads),
162 "Racey reads are discarded"); 162 "Racey reads are discarded");
163 163
164 { 164 {
165 base::AutoLock lock(devices_changed_lock_); 165 base::AutoLock lock(devices_changed_lock_);
166 changed = devices_changed_; 166 changed = devices_changed_;
167 devices_changed_ = false; 167 devices_changed_ = false;
168 } 168 }
169 169
170 // Acquire the SeqLock. There is only ever one writer to this data. 170 // Acquire the SeqLock. There is only ever one writer to this data.
171 // See gamepad_hardware_buffer.h. 171 // See gamepad_hardware_buffer.h.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 if (GamepadsHaveUserGesture(SharedMemoryAsHardwareBuffer()->buffer)) { 211 if (GamepadsHaveUserGesture(SharedMemoryAsHardwareBuffer()->buffer)) {
212 for (size_t i = 0; i < user_gesture_observers_.size(); i++) { 212 for (size_t i = 0; i < user_gesture_observers_.size(); i++) {
213 user_gesture_observers_[i].message_loop->PostTask(FROM_HERE, 213 user_gesture_observers_[i].message_loop->PostTask(FROM_HERE,
214 user_gesture_observers_[i].closure); 214 user_gesture_observers_[i].closure);
215 } 215 }
216 user_gesture_observers_.clear(); 216 user_gesture_observers_.clear();
217 } 217 }
218 } 218 }
219 219
220 } // namespace content 220 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/gamepad/gamepad_platform_data_fetcher_win.cc ('k') | content/browser/gamepad/gamepad_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698