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

Side by Side Diff: content/public/test/mock_render_process_host.h

Issue 1544293002: Convert Pass()→std::move() in //content (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/public/test/test_browser_context.cc » ('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) 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_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 #include <utility>
10 11
11 #include "base/macros.h" 12 #include "base/macros.h"
12 #include "base/memory/scoped_vector.h" 13 #include "base/memory/scoped_vector.h"
13 #include "base/observer_list.h" 14 #include "base/observer_list.h"
14 #include "content/public/browser/render_process_host.h" 15 #include "content/public/browser/render_process_host.h"
15 #include "content/public/browser/render_process_host_factory.h" 16 #include "content/public/browser/render_process_host_factory.h"
16 #include "ipc/ipc_test_sink.h" 17 #include "ipc/ipc_test_sink.h"
17 18
18 class StoragePartition; 19 class StoragePartition;
19 20
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 121
121 void set_is_for_guests_only(bool is_for_guests_only) { 122 void set_is_for_guests_only(bool is_for_guests_only) {
122 is_for_guests_only_ = is_for_guests_only; 123 is_for_guests_only_ = is_for_guests_only;
123 } 124 }
124 125
125 void set_is_process_backgrounded(bool is_process_backgrounded) { 126 void set_is_process_backgrounded(bool is_process_backgrounded) {
126 is_process_backgrounded_ = is_process_backgrounded; 127 is_process_backgrounded_ = is_process_backgrounded;
127 } 128 }
128 129
129 void SetProcessHandle(scoped_ptr<base::ProcessHandle> new_handle) { 130 void SetProcessHandle(scoped_ptr<base::ProcessHandle> new_handle) {
130 process_handle = new_handle.Pass(); 131 process_handle = std::move(new_handle);
131 } 132 }
132 133
133 void GetAudioOutputControllers( 134 void GetAudioOutputControllers(
134 const GetAudioOutputControllersCallback& callback) const override {} 135 const GetAudioOutputControllersCallback& callback) const override {}
135 136
136 int worker_ref_count() const { return worker_ref_count_; } 137 int worker_ref_count() const { return worker_ref_count_; }
137 138
138 private: 139 private:
139 // Stores IPC messages that would have been sent to the renderer. 140 // Stores IPC messages that would have been sent to the renderer.
140 IPC::TestSink sink_; 141 IPC::TestSink sink_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 // for deleting all MockRenderProcessHosts that have not deleted by a test in 178 // for deleting all MockRenderProcessHosts that have not deleted by a test in
178 // the destructor and prevent them from being leaked. 179 // the destructor and prevent them from being leaked.
179 mutable ScopedVector<MockRenderProcessHost> processes_; 180 mutable ScopedVector<MockRenderProcessHost> processes_;
180 181
181 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory); 182 DISALLOW_COPY_AND_ASSIGN(MockRenderProcessHostFactory);
182 }; 183 };
183 184
184 } // namespace content 185 } // namespace content
185 186
186 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_ 187 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_PROCESS_HOST_H_
OLDNEW
« no previous file with comments | « content/public/test/browser_test_utils.cc ('k') | content/public/test/test_browser_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698