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

Side by Side Diff: services/ui/service.cc

Issue 2617883002: Add a new BindInterface() method to Connector. (Closed)
Patch Set: . Created 3 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 | « services/ui/public/cpp/window_tree_host_factory.cc ('k') | services/ui/ws/gpu_host.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 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 "services/ui/service.h" 5 #include "services/ui/service.h"
6 6
7 #include <set> 7 #include <set>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
102 if (ui::ResourceBundle::HasSharedInstance()) 102 if (ui::ResourceBundle::HasSharedInstance())
103 return; 103 return;
104 104
105 std::set<std::string> resource_paths; 105 std::set<std::string> resource_paths;
106 resource_paths.insert(kResourceFileStrings); 106 resource_paths.insert(kResourceFileStrings);
107 resource_paths.insert(kResourceFile100); 107 resource_paths.insert(kResourceFile100);
108 resource_paths.insert(kResourceFile200); 108 resource_paths.insert(kResourceFile200);
109 109
110 catalog::ResourceLoader loader; 110 catalog::ResourceLoader loader;
111 filesystem::mojom::DirectoryPtr directory; 111 filesystem::mojom::DirectoryPtr directory;
112 connector->ConnectToInterface(catalog::mojom::kServiceName, &directory); 112 connector->BindInterface(catalog::mojom::kServiceName, &directory);
113 CHECK(loader.OpenFiles(std::move(directory), resource_paths)); 113 CHECK(loader.OpenFiles(std::move(directory), resource_paths));
114 114
115 ui::RegisterPathProvider(); 115 ui::RegisterPathProvider();
116 116
117 // Initialize resource bundle with 1x and 2x cursor bitmaps. 117 // Initialize resource bundle with 1x and 2x cursor bitmaps.
118 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion( 118 ui::ResourceBundle::InitSharedInstanceWithPakFileRegion(
119 loader.TakeFile(kResourceFileStrings), 119 loader.TakeFile(kResourceFileStrings),
120 base::MemoryMappedFile::Region::kWholeFile); 120 base::MemoryMappedFile::Region::kWholeFile);
121 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 121 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
122 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100), 122 rb.AddDataPackFromFile(loader.TakeFile(kResourceFile100),
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 mojom::WindowServerTestRequest request) { 376 mojom::WindowServerTestRequest request) {
377 if (!test_config_) 377 if (!test_config_)
378 return; 378 return;
379 mojo::MakeStrongBinding( 379 mojo::MakeStrongBinding(
380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()), 380 base::MakeUnique<ws::WindowServerTestImpl>(window_server_.get()),
381 std::move(request)); 381 std::move(request));
382 } 382 }
383 383
384 384
385 } // namespace ui 385 } // namespace ui
OLDNEW
« no previous file with comments | « services/ui/public/cpp/window_tree_host_factory.cc ('k') | services/ui/ws/gpu_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698