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

Side by Side Diff: chrome/browser/ui/views/chrome_browser_main_extra_parts_views.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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h" 5 #include "chrome/browser/ui/views/chrome_browser_main_extra_parts_views.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h" 8 #include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
9 #include "chrome/browser/ui/views/chrome_views_delegate.h" 9 #include "chrome/browser/ui/views/chrome_views_delegate.h"
10 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h" 10 #include "chrome/browser/ui/views/ime_driver/ime_driver_mus.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 #if defined(USE_AURA) 103 #if defined(USE_AURA)
104 if (service_manager::ServiceManagerIsRemote()) { 104 if (service_manager::ServiceManagerIsRemote()) {
105 // TODO(rockot): Remove the blocking wait for init. 105 // TODO(rockot): Remove the blocking wait for init.
106 // http://crbug.com/594852. 106 // http://crbug.com/594852.
107 base::RunLoop wait_loop; 107 base::RunLoop wait_loop;
108 connection->SetInitializeHandler(wait_loop.QuitClosure()); 108 connection->SetInitializeHandler(wait_loop.QuitClosure());
109 wait_loop.Run(); 109 wait_loop.Run();
110 110
111 input_device_client_.reset(new ui::InputDeviceClient()); 111 input_device_client_.reset(new ui::InputDeviceClient());
112 ui::mojom::InputDeviceServerPtr server; 112 ui::mojom::InputDeviceServerPtr server;
113 connection->GetConnector()->ConnectToInterface(ui::mojom::kServiceName, 113 connection->GetConnector()->BindInterface(ui::mojom::kServiceName, &server);
114 &server);
115 input_device_client_->Connect(std::move(server)); 114 input_device_client_->Connect(std::move(server));
116 115
117 // WMState is owned as a member, so don't have MusClient create it. 116 // WMState is owned as a member, so don't have MusClient create it.
118 const bool create_wm_state = false; 117 const bool create_wm_state = false;
119 mus_client_ = base::MakeUnique<views::MusClient>( 118 mus_client_ = base::MakeUnique<views::MusClient>(
120 connection->GetConnector(), connection->GetIdentity(), 119 connection->GetConnector(), connection->GetIdentity(),
121 content::BrowserThread::GetTaskRunnerForThread( 120 content::BrowserThread::GetTaskRunnerForThread(
122 content::BrowserThread::IO), 121 content::BrowserThread::IO),
123 create_wm_state); 122 create_wm_state);
124 } 123 }
125 #endif // defined(USE_AURA) 124 #endif // defined(USE_AURA)
126 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/browser_command_controller.cc ('k') | chrome/browser/ui/views/ime_driver/ime_driver_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698