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

Side by Side Diff: ui/views_content_client/views_content_client_main_parts.cc

Issue 1539583003: Convert Pass()→std::move() in ui/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "ui/views_content_client/views_content_client_main_parts.h" 5 #include "ui/views_content_client/views_content_client_main_parts.h"
6 6
7 #include <utility>
8
7 #include "base/run_loop.h" 9 #include "base/run_loop.h"
8 #include "content/public/browser/context_factory.h" 10 #include "content/public/browser/context_factory.h"
9 #include "content/shell/browser/shell_browser_context.h" 11 #include "content/shell/browser/shell_browser_context.h"
10 #include "ui/base/ime/input_method_initializer.h" 12 #include "ui/base/ime/input_method_initializer.h"
11 #include "ui/views/test/desktop_test_views_delegate.h" 13 #include "ui/views/test/desktop_test_views_delegate.h"
12 14
13 namespace ui { 15 namespace ui {
14 16
15 ViewsContentClientMainParts::ViewsContentClientMainParts( 17 ViewsContentClientMainParts::ViewsContentClientMainParts(
16 const content::MainFunctionParams& content_params, 18 const content::MainFunctionParams& content_params,
17 ViewsContentClient* views_content_client) 19 ViewsContentClient* views_content_client)
18 : views_content_client_(views_content_client) { 20 : views_content_client_(views_content_client) {
19 } 21 }
20 22
21 ViewsContentClientMainParts::~ViewsContentClientMainParts() { 23 ViewsContentClientMainParts::~ViewsContentClientMainParts() {
22 } 24 }
23 25
24 void ViewsContentClientMainParts::PreMainMessageLoopRun() { 26 void ViewsContentClientMainParts::PreMainMessageLoopRun() {
25 ui::InitializeInputMethodForTesting(); 27 ui::InitializeInputMethodForTesting();
26 browser_context_.reset(new content::ShellBrowserContext(false, NULL)); 28 browser_context_.reset(new content::ShellBrowserContext(false, NULL));
27 29
28 scoped_ptr<views::TestViewsDelegate> test_views_delegate( 30 scoped_ptr<views::TestViewsDelegate> test_views_delegate(
29 new views::DesktopTestViewsDelegate); 31 new views::DesktopTestViewsDelegate);
30 test_views_delegate->set_context_factory(content::GetContextFactory()); 32 test_views_delegate->set_context_factory(content::GetContextFactory());
31 views_delegate_ = test_views_delegate.Pass(); 33 views_delegate_ = std::move(test_views_delegate);
32 } 34 }
33 35
34 void ViewsContentClientMainParts::PostMainMessageLoopRun() { 36 void ViewsContentClientMainParts::PostMainMessageLoopRun() {
35 browser_context_.reset(); 37 browser_context_.reset();
36 views_delegate_.reset(); 38 views_delegate_.reset();
37 } 39 }
38 40
39 bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) { 41 bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) {
40 base::RunLoop run_loop; 42 base::RunLoop run_loop;
41 run_loop.Run(); 43 run_loop.Run();
42 return true; 44 return true;
43 } 45 }
44 46
45 } // namespace ui 47 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views_content_client/views_content_browser_client.cc ('k') | ui/wm/core/accelerator_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698