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

Side by Side Diff: mandoline/ui/desktop_ui/browser_manager.cc

Issue 1345783002: Updates mojo:view_manager -> mojo:mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 | « mandoline/ui/aura/surface_binding.cc ('k') | mojo/runner/android/main.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 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 "mandoline/ui/desktop_ui/browser_manager.h" 5 #include "mandoline/ui/desktop_ui/browser_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "components/mus/public/cpp/view.h" 8 #include "components/mus/public/cpp/view.h"
9 #include "components/mus/public/cpp/view_observer.h" 9 #include "components/mus/public/cpp/view_observer.h"
10 #include "mandoline/ui/desktop_ui/browser_window.h" 10 #include "mandoline/ui/desktop_ui/browser_window.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 DCHECK(!browsers_.empty()); 42 DCHECK(!browsers_.empty());
43 // TODO(fsamuel): Create a new Browser once we support multiple browser 43 // TODO(fsamuel): Create a new Browser once we support multiple browser
44 // windows. 44 // windows.
45 (*browsers_.begin())->LoadURL(GURL(url)); 45 (*browsers_.begin())->LoadURL(GURL(url));
46 } 46 }
47 47
48 void BrowserManager::Initialize(mojo::ApplicationImpl* app) { 48 void BrowserManager::Initialize(mojo::ApplicationImpl* app) {
49 app_ = app; 49 app_ = app;
50 50
51 mojo::URLRequestPtr request(mojo::URLRequest::New()); 51 mojo::URLRequestPtr request(mojo::URLRequest::New());
52 request->url = "mojo:view_manager"; 52 request->url = "mojo:mus";
53 app_->ConnectToService(request.Pass(), &host_factory_); 53 app_->ConnectToService(request.Pass(), &host_factory_);
54 54
55 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 55 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
56 // Create a Browser for each valid URL in the command line. 56 // Create a Browser for each valid URL in the command line.
57 for (const auto& arg : command_line->GetArgs()) { 57 for (const auto& arg : command_line->GetArgs()) {
58 GURL url(arg); 58 GURL url(arg);
59 if (url.is_valid()) 59 if (url.is_valid())
60 CreateBrowser(url); 60 CreateBrowser(url);
61 } 61 }
62 // If there were no valid URLs in the command line create a Browser with the 62 // If there were no valid URLs in the command line create a Browser with the
63 // default URL. 63 // default URL.
64 if (browsers_.empty()) 64 if (browsers_.empty())
65 CreateBrowser(GURL(kGoogleURL)); 65 CreateBrowser(GURL(kGoogleURL));
66 } 66 }
67 67
68 bool BrowserManager::ConfigureIncomingConnection( 68 bool BrowserManager::ConfigureIncomingConnection(
69 mojo::ApplicationConnection* connection) { 69 mojo::ApplicationConnection* connection) {
70 connection->AddService<LaunchHandler>(this); 70 connection->AddService<LaunchHandler>(this);
71 return true; 71 return true;
72 } 72 }
73 73
74 void BrowserManager::Create(mojo::ApplicationConnection* connection, 74 void BrowserManager::Create(mojo::ApplicationConnection* connection,
75 mojo::InterfaceRequest<LaunchHandler> request) { 75 mojo::InterfaceRequest<LaunchHandler> request) {
76 launch_handler_bindings_.AddBinding(this, request.Pass()); 76 launch_handler_bindings_.AddBinding(this, request.Pass());
77 } 77 }
78 78
79 } // namespace mandoline 79 } // namespace mandoline
OLDNEW
« no previous file with comments | « mandoline/ui/aura/surface_binding.cc ('k') | mojo/runner/android/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698