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

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

Issue 2563783002: ui + mus: Split ContextFactory into ContextFactory(Client) and ContextFactoryPrivate (Closed)
Patch Set: Restore mash Created 4 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
« no previous file with comments | « ui/views/views_delegate.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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> 7 #include <utility>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "content/public/browser/context_factory.h" 10 #include "content/public/browser/context_factory.h"
(...skipping 14 matching lines...) Expand all
25 } 25 }
26 26
27 void ViewsContentClientMainParts::PreMainMessageLoopRun() { 27 void ViewsContentClientMainParts::PreMainMessageLoopRun() {
28 ui::MaterialDesignController::Initialize(); 28 ui::MaterialDesignController::Initialize();
29 ui::InitializeInputMethodForTesting(); 29 ui::InitializeInputMethodForTesting();
30 browser_context_.reset(new content::ShellBrowserContext(false, NULL)); 30 browser_context_.reset(new content::ShellBrowserContext(false, NULL));
31 31
32 std::unique_ptr<views::TestViewsDelegate> test_views_delegate( 32 std::unique_ptr<views::TestViewsDelegate> test_views_delegate(
33 new views::DesktopTestViewsDelegate); 33 new views::DesktopTestViewsDelegate);
34 test_views_delegate->set_context_factory(content::GetContextFactory()); 34 test_views_delegate->set_context_factory(content::GetContextFactory());
35 test_views_delegate->set_context_factory_private(
36 content::GetContextFactoryPrivate());
35 views_delegate_ = std::move(test_views_delegate); 37 views_delegate_ = std::move(test_views_delegate);
36 } 38 }
37 39
38 void ViewsContentClientMainParts::PostMainMessageLoopRun() { 40 void ViewsContentClientMainParts::PostMainMessageLoopRun() {
39 browser_context_.reset(); 41 browser_context_.reset();
40 views_delegate_.reset(); 42 views_delegate_.reset();
41 } 43 }
42 44
43 bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) { 45 bool ViewsContentClientMainParts::MainMessageLoopRun(int* result_code) {
44 base::RunLoop run_loop; 46 base::RunLoop run_loop;
45 run_loop.Run(); 47 run_loop.Run();
46 return true; 48 return true;
47 } 49 }
48 50
49 } // namespace ui 51 } // namespace ui
OLDNEW
« no previous file with comments | « ui/views/views_delegate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698