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

Side by Side Diff: content/browser/vibration_manager_integration_browsertest.cc

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 <stdint.h> 5 #include <stdint.h>
6 #include <utility>
6 7
7 #include "base/macros.h" 8 #include "base/macros.h"
8 #include "build/build_config.h" 9 #include "build/build_config.h"
9 #include "content/public/browser/content_browser_client.h" 10 #include "content/public/browser/content_browser_client.h"
10 #include "content/public/common/service_registry.h" 11 #include "content/public/common/service_registry.h"
11 #include "content/public/test/content_browser_test.h" 12 #include "content/public/test/content_browser_test.h"
12 #include "content/public/test/content_browser_test_utils.h" 13 #include "content/public/test/content_browser_test_utils.h"
13 #include "content/public/test/test_utils.h" 14 #include "content/public/test/test_utils.h"
14 #include "content/shell/browser/shell.h" 15 #include "content/shell/browser/shell.h"
15 #include "content/shell/browser/shell_content_browser_client.h" 16 #include "content/shell/browser/shell_content_browser_client.h"
(...skipping 21 matching lines...) Expand all
37 g_vibrate_milliseconds = -1; 38 g_vibrate_milliseconds = -1;
38 g_cancelled = false; 39 g_cancelled = false;
39 40
40 g_wait_vibrate_runner = new content::MessageLoopRunner(); 41 g_wait_vibrate_runner = new content::MessageLoopRunner();
41 g_wait_cancel_runner = new content::MessageLoopRunner(); 42 g_wait_cancel_runner = new content::MessageLoopRunner();
42 } 43 }
43 44
44 class FakeVibrationManager : public device::VibrationManager { 45 class FakeVibrationManager : public device::VibrationManager {
45 public: 46 public:
46 static void Create(mojo::InterfaceRequest<VibrationManager> request) { 47 static void Create(mojo::InterfaceRequest<VibrationManager> request) {
47 new FakeVibrationManager(request.Pass()); 48 new FakeVibrationManager(std::move(request));
48 } 49 }
49 50
50 private: 51 private:
51 FakeVibrationManager(mojo::InterfaceRequest<VibrationManager> request) 52 FakeVibrationManager(mojo::InterfaceRequest<VibrationManager> request)
52 : binding_(this, request.Pass()) {} 53 : binding_(this, std::move(request)) {}
53 ~FakeVibrationManager() override {} 54 ~FakeVibrationManager() override {}
54 55
55 void Vibrate(int64_t milliseconds) override { 56 void Vibrate(int64_t milliseconds) override {
56 g_vibrate_milliseconds = milliseconds; 57 g_vibrate_milliseconds = milliseconds;
57 g_wait_vibrate_runner->Quit(); 58 g_wait_vibrate_runner->Quit();
58 } 59 }
59 60
60 void Cancel() override { 61 void Cancel() override {
61 g_cancelled = true; 62 g_cancelled = true;
62 g_wait_cancel_runner->Quit(); 63 g_wait_cancel_runner->Quit();
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 shell()->LoadURL(test_url); 131 shell()->LoadURL(test_url);
131 // Wait until VibrationManager::Cancel() got called. 132 // Wait until VibrationManager::Cancel() got called.
132 g_wait_cancel_runner->Run(); 133 g_wait_cancel_runner->Run();
133 134
134 EXPECT_TRUE(g_cancelled); 135 EXPECT_TRUE(g_cancelled);
135 } 136 }
136 137
137 } // namespace 138 } // namespace
138 139
139 } // namespace content 140 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/tracing/tracing_controller_impl_data_sinks.cc ('k') | content/browser/wake_lock/wake_lock_service_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698