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

Side by Side Diff: content/browser/geolocation/win7_location_provider_win.cc

Issue 19532003: Use a direct include of the message_loop header in content/, part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | 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 "content/browser/geolocation/win7_location_provider_win.h" 5 #include "content/browser/geolocation/win7_location_provider_win.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/logging.h" 12 #include "base/logging.h"
13 #include "base/message_loop.h" 13 #include "base/message_loop/message_loop.h"
14 14
15 namespace content { 15 namespace content {
16 namespace { 16 namespace {
17 17
18 const int kPollPeriodMovingMillis = 500; 18 const int kPollPeriodMovingMillis = 500;
19 // Poll less frequently whilst stationary. 19 // Poll less frequently whilst stationary.
20 const int kPollPeriodStationaryMillis = kPollPeriodMovingMillis * 3; 20 const int kPollPeriodStationaryMillis = kPollPeriodMovingMillis * 3;
21 // Reading must differ by more than this amount to be considered movement. 21 // Reading must differ by more than this amount to be considered movement.
22 const int kMovementThresholdMeters = 20; 22 const int kMovementThresholdMeters = 20;
23 23
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 } 101 }
102 102
103 LocationProvider* NewSystemLocationProvider() { 103 LocationProvider* NewSystemLocationProvider() {
104 Win7LocationApi* api = Win7LocationApi::Create(); 104 Win7LocationApi* api = Win7LocationApi::Create();
105 if (api == NULL) 105 if (api == NULL)
106 return NULL; // API not supported on this machine. 106 return NULL; // API not supported on this machine.
107 return new Win7LocationProvider(api); 107 return new Win7LocationProvider(api);
108 } 108 }
109 109
110 } // namespace content 110 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698