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

Side by Side Diff: chrome/browser/ui/ash/chrome_new_window_client.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ash/chrome_new_window_client.h" 5 #include "chrome/browser/ui/ash/chrome_new_window_client.h"
6 6
7 #include "ash/content/keyboard_overlay/keyboard_overlay_view.h" 7 #include "ash/content/keyboard_overlay/keyboard_overlay_view.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "chrome/browser/chromeos/file_manager/app_id.h" 9 #include "chrome/browser/chromeos/file_manager/app_id.h"
10 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 10 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
(...skipping 29 matching lines...) Expand all
40 sessions::TabRestoreService* service = 40 sessions::TabRestoreService* service =
41 TabRestoreServiceFactory::GetForProfile(profile); 41 TabRestoreServiceFactory::GetForProfile(profile);
42 service->RestoreMostRecentEntry(nullptr); 42 service->RestoreMostRecentEntry(nullptr);
43 } 43 }
44 44
45 } // namespace 45 } // namespace
46 46
47 ChromeNewWindowClient::ChromeNewWindowClient() : binding_(this) { 47 ChromeNewWindowClient::ChromeNewWindowClient() : binding_(this) {
48 service_manager::Connector* connector = 48 service_manager::Connector* connector =
49 content::ServiceManagerConnection::GetForProcess()->GetConnector(); 49 content::ServiceManagerConnection::GetForProcess()->GetConnector();
50 connector->ConnectToInterface(ash_util::GetAshServiceName(), 50 connector->BindInterface(ash_util::GetAshServiceName(),
51 &new_window_controller_); 51 &new_window_controller_);
52 52
53 // Register this object as the client interface implementation. 53 // Register this object as the client interface implementation.
54 ash::mojom::NewWindowClientAssociatedPtrInfo ptr_info; 54 ash::mojom::NewWindowClientAssociatedPtrInfo ptr_info;
55 binding_.Bind(&ptr_info, new_window_controller_.associated_group()); 55 binding_.Bind(&ptr_info, new_window_controller_.associated_group());
56 new_window_controller_->SetClient(std::move(ptr_info)); 56 new_window_controller_->SetClient(std::move(ptr_info));
57 } 57 }
58 58
59 ChromeNewWindowClient::~ChromeNewWindowClient() {} 59 ChromeNewWindowClient::~ChromeNewWindowClient() {}
60 60
61 // TabRestoreHelper is used to restore a tab. In particular when the user 61 // TabRestoreHelper is used to restore a tab. In particular when the user
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 GURL(url)); 200 GURL(url));
201 } 201 }
202 202
203 void ChromeNewWindowClient::ShowTaskManager() { 203 void ChromeNewWindowClient::ShowTaskManager() {
204 chrome::OpenTaskManager(NULL); 204 chrome::OpenTaskManager(NULL);
205 } 205 }
206 206
207 void ChromeNewWindowClient::OpenFeedbackPage() { 207 void ChromeNewWindowClient::OpenFeedbackPage() {
208 chrome::OpenFeedbackDialog(BrowserList::GetInstance()->GetLastActive()); 208 chrome::OpenFeedbackDialog(BrowserList::GetInstance()->GetLastActive());
209 } 209 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/cast_config_client_media_router.cc ('k') | chrome/browser/ui/ash/launcher/chrome_launcher_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698