| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |