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

Side by Side Diff: services/navigation/content_client/browser_main_parts.cc

Issue 1986003002: Revert of Add a basic browser to mash that uses the navigation service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 | « services/navigation/DEPS ('k') | services/navigation/content_client/main_delegate.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 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 "services/navigation/content_client/browser_main_parts.h" 5 #include "services/navigation/content_client/browser_main_parts.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "content/public/common/mojo_shell_connection.h"
9 #include "content/shell/browser/shell_browser_context.h" 8 #include "content/shell/browser/shell_browser_context.h"
10 #include "content/shell/browser/shell_net_log.h" 9 #include "content/shell/browser/shell_net_log.h"
11 #include "services/navigation/navigation.h" 10 #include "services/navigation/navigation.h"
12 #include "ui/views/test/test_views_delegate.h" 11 #include "ui/views/test/test_views_delegate.h"
13 12
14 namespace navigation { 13 namespace navigation {
15 14
16 BrowserMainParts::BrowserMainParts( 15 BrowserMainParts::BrowserMainParts(
17 const content::MainFunctionParams& parameters) {} 16 const content::MainFunctionParams& parameters) {}
18 BrowserMainParts::~BrowserMainParts() {} 17 BrowserMainParts::~BrowserMainParts() {}
19 18
20 void BrowserMainParts::ToolkitInitialized() { 19 void BrowserMainParts::ToolkitInitialized() {
21 if (!views::ViewsDelegate::GetInstance()) 20 if (!views::ViewsDelegate::GetInstance())
22 views_delegate_.reset(new views::TestViewsDelegate); 21 views_delegate_.reset(new views::TestViewsDelegate);
23 } 22 }
24 23
25 void BrowserMainParts::PreMainMessageLoopRun() { 24 void BrowserMainParts::PreMainMessageLoopRun() {
26 net_log_.reset(new content::ShellNetLog("ash_shell")); 25 net_log_.reset(new content::ShellNetLog("ash_shell"));
27 browser_context_.reset( 26 browser_context_.reset(
28 new content::ShellBrowserContext(false, net_log_.get())); 27 new content::ShellBrowserContext(false, net_log_.get()));
29 navigation_->Init(content::MojoShellConnection::Get()->GetConnector(), 28 navigation_->SetBrowserContext(browser_context());
30 browser_context());
31 } 29 }
32 30
33 void BrowserMainParts::PostMainMessageLoopRun() { 31 void BrowserMainParts::PostMainMessageLoopRun() {
34 views_delegate_.reset(); 32 views_delegate_.reset();
35 browser_context_.reset(); 33 browser_context_.reset();
36 } 34 }
37 35
38 bool BrowserMainParts::MainMessageLoopRun(int* result_code) { 36 bool BrowserMainParts::MainMessageLoopRun(int* result_code) {
39 base::MessageLoop::current()->Run(); 37 base::MessageLoop::current()->Run();
40 return true; 38 return true;
41 } 39 }
42 40
43 } // namespace navigation 41 } // namespace navigation
OLDNEW
« no previous file with comments | « services/navigation/DEPS ('k') | services/navigation/content_client/main_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698