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

Side by Side Diff: content/browser/device_orientation/data_fetcher_shared_memory_win.cc

Issue 152893002: [DeviceLight API] Content Side Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix in Java file, stop() Created 6 years, 8 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "data_fetcher_shared_memory.h" 5 #include "data_fetcher_shared_memory.h"
6 6
7 #include <GuidDef.h> 7 #include <GuidDef.h>
8 #include <InitGuid.h> 8 #include <InitGuid.h>
9 #include <PortableDeviceTypes.h> 9 #include <PortableDeviceTypes.h>
10 #include <Sensors.h> 10 #include <Sensors.h>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 else if (variant_value.vt == VT_R4) 82 else if (variant_value.vt == VT_R4)
83 *value = variant_value.fltVal; 83 *value = variant_value.fltVal;
84 *has_value = true; 84 *has_value = true;
85 } else { 85 } else {
86 *value = 0; 86 *value = 0;
87 *has_value = false; 87 *has_value = false;
88 } 88 }
89 } 89 }
90 90
91 private: 91 private:
92
93 DISALLOW_COPY_AND_ASSIGN(SensorEventSink); 92 DISALLOW_COPY_AND_ASSIGN(SensorEventSink);
94 }; 93 };
95 94
96 class DataFetcherSharedMemory::SensorEventSinkOrientation 95 class DataFetcherSharedMemory::SensorEventSinkOrientation
97 : public DataFetcherSharedMemory::SensorEventSink { 96 : public DataFetcherSharedMemory::SensorEventSink {
98 public: 97 public:
99 explicit SensorEventSinkOrientation( 98 explicit SensorEventSinkOrientation(
100 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {} 99 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {}
101 virtual ~SensorEventSinkOrientation() {} 100 virtual ~SensorEventSinkOrientation() {}
102 101
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
389 motion_buffer_->seqlock.WriteBegin(); 388 motion_buffer_->seqlock.WriteBegin();
390 motion_buffer_->data.allAvailableSensorsAreActive = enabled; 389 motion_buffer_->data.allAvailableSensorsAreActive = enabled;
391 motion_buffer_->seqlock.WriteEnd(); 390 motion_buffer_->seqlock.WriteEnd();
392 } 391 }
393 default: 392 default:
394 NOTREACHED(); 393 NOTREACHED();
395 } 394 }
396 } 395 }
397 396
398 } // namespace content 397 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698