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

Side by Side Diff: content/browser/geolocation/mock_location_provider.h

Issue 7605019: Reduce number of unnamed-type-template-args violations. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | content/common/content_notification_types.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ 5 #ifndef CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_
6 #define CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ 6 #define CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_
7 #pragma once 7 #pragma once
8 8
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 14 matching lines...) Expand all
25 // Updates listeners with the new position. 25 // Updates listeners with the new position.
26 void HandlePositionChanged(const Geoposition& position); 26 void HandlePositionChanged(const Geoposition& position);
27 27
28 // LocationProviderBase implementation. 28 // LocationProviderBase implementation.
29 virtual bool StartProvider(bool high_accuracy); 29 virtual bool StartProvider(bool high_accuracy);
30 virtual void StopProvider(); 30 virtual void StopProvider();
31 virtual void GetPosition(Geoposition* position); 31 virtual void GetPosition(Geoposition* position);
32 virtual void OnPermissionGranted(const GURL& requesting_frame); 32 virtual void OnPermissionGranted(const GURL& requesting_frame);
33 33
34 Geoposition position_; 34 Geoposition position_;
35 enum { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_; 35 enum State { STOPPED, LOW_ACCURACY, HIGH_ACCURACY } state_;
36 GURL permission_granted_url_; 36 GURL permission_granted_url_;
37 MockLocationProvider** self_ref_; 37 MockLocationProvider** self_ref_;
38 38
39 scoped_refptr<base::MessageLoopProxy> provider_loop_; 39 scoped_refptr<base::MessageLoopProxy> provider_loop_;
40 40
41 // Set when an instance of the mock is created via a factory function. 41 // Set when an instance of the mock is created via a factory function.
42 static MockLocationProvider* instance_; 42 static MockLocationProvider* instance_;
43 43
44 DISALLOW_COPY_AND_ASSIGN(MockLocationProvider); 44 DISALLOW_COPY_AND_ASSIGN(MockLocationProvider);
45 }; 45 };
(...skipping 10 matching lines...) Expand all
56 LocationProviderBase* NewAutoSuccessMockLocationProvider(); 56 LocationProviderBase* NewAutoSuccessMockLocationProvider();
57 // Creates a mock location provider that automatically notifies its 57 // Creates a mock location provider that automatically notifies its
58 // listeners with an error when StartProvider is called. 58 // listeners with an error when StartProvider is called.
59 LocationProviderBase* NewAutoFailMockLocationProvider(); 59 LocationProviderBase* NewAutoFailMockLocationProvider();
60 // Similar to NewAutoSuccessMockLocationProvider but mimicks the behavior of 60 // Similar to NewAutoSuccessMockLocationProvider but mimicks the behavior of
61 // the Network Location provider, in deferring making location updates until 61 // the Network Location provider, in deferring making location updates until
62 // a permission request has been confirmed. 62 // a permission request has been confirmed.
63 LocationProviderBase* NewAutoSuccessMockNetworkLocationProvider(); 63 LocationProviderBase* NewAutoSuccessMockNetworkLocationProvider();
64 64
65 #endif // CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_ 65 #endif // CONTENT_BROWSER_GEOLOCATION_MOCK_LOCATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « chrome/common/chrome_notification_types.h ('k') | content/common/content_notification_types.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698