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

Side by Side Diff: content/browser/gamepad/gamepad_test_helpers.h

Issue 11740038: Cleanup: Fix some lint errors in content/. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_ 5 #ifndef CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_
6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_ 6 #define CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/synchronization/lock.h" 10 #include "base/synchronization/lock.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 62
63 scoped_ptr<base::SystemMonitor> system_monitor_; 63 scoped_ptr<base::SystemMonitor> system_monitor_;
64 64
65 DISALLOW_COPY_AND_ASSIGN(GamepadTestHelper); 65 DISALLOW_COPY_AND_ASSIGN(GamepadTestHelper);
66 }; 66 };
67 67
68 // Constructs a GamepadService with a mock data source. This bypasses the 68 // Constructs a GamepadService with a mock data source. This bypasses the
69 // global singleton for the gamepad service. 69 // global singleton for the gamepad service.
70 class GamepadServiceTestConstructor : public GamepadTestHelper { 70 class GamepadServiceTestConstructor : public GamepadTestHelper {
71 public: 71 public:
72 GamepadServiceTestConstructor(const WebKit::WebGamepads& test_data); 72 explicit GamepadServiceTestConstructor(const WebKit::WebGamepads& test_data);
73 virtual ~GamepadServiceTestConstructor(); 73 virtual ~GamepadServiceTestConstructor();
74 74
75 GamepadService* gamepad_service() { return gamepad_service_; } 75 GamepadService* gamepad_service() { return gamepad_service_; }
76 MockGamepadDataFetcher* data_fetcher() { return data_fetcher_; } 76 MockGamepadDataFetcher* data_fetcher() { return data_fetcher_; }
77 77
78 private: 78 private:
79 // Owning pointer (can't be a scoped_ptr due to private destructor). 79 // Owning pointer (can't be a scoped_ptr due to private destructor).
80 GamepadService* gamepad_service_; 80 GamepadService* gamepad_service_;
81 81
82 // Pointer owned by the provider (which is owned by the gamepad service). 82 // Pointer owned by the provider (which is owned by the gamepad service).
83 MockGamepadDataFetcher* data_fetcher_; 83 MockGamepadDataFetcher* data_fetcher_;
84 84
85 DISALLOW_COPY_AND_ASSIGN(GamepadServiceTestConstructor); 85 DISALLOW_COPY_AND_ASSIGN(GamepadServiceTestConstructor);
86 }; 86 };
87 87
88 } // namespace content 88 } // namespace content
89 89
90 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_ 90 #endif // CONTENT_BROWSER_GAMEPAD_GAMEPAD_TEST_HELPERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698