Chromium Code Reviews| OLD | NEW |
|---|---|
| 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/browser_command_controller.h" | 5 #include "chrome/browser/ui/browser_command_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... | |
| 21 #include "chrome/browser/extensions/extension_service.h" | 21 #include "chrome/browser/extensions/extension_service.h" |
| 22 #include "chrome/browser/extensions/extension_util.h" | 22 #include "chrome/browser/extensions/extension_util.h" |
| 23 #include "chrome/browser/lifetime/application_lifetime.h" | 23 #include "chrome/browser/lifetime/application_lifetime.h" |
| 24 #include "chrome/browser/prefs/incognito_mode_prefs.h" | 24 #include "chrome/browser/prefs/incognito_mode_prefs.h" |
| 25 #include "chrome/browser/profiles/profile.h" | 25 #include "chrome/browser/profiles/profile.h" |
| 26 #include "chrome/browser/profiles/profile_manager.h" | 26 #include "chrome/browser/profiles/profile_manager.h" |
| 27 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 27 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
| 28 #include "chrome/browser/shell_integration.h" | 28 #include "chrome/browser/shell_integration.h" |
| 29 #include "chrome/browser/signin/signin_promo.h" | 29 #include "chrome/browser/signin/signin_promo.h" |
| 30 #include "chrome/browser/sync/profile_sync_service_factory.h" | 30 #include "chrome/browser/sync/profile_sync_service_factory.h" |
| 31 #include "chrome/browser/ui/ash/ash_util.h" | |
| 31 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" | 32 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" |
| 32 #include "chrome/browser/ui/browser.h" | 33 #include "chrome/browser/ui/browser.h" |
| 33 #include "chrome/browser/ui/browser_commands.h" | 34 #include "chrome/browser/ui/browser_commands.h" |
| 34 #include "chrome/browser/ui/browser_window.h" | 35 #include "chrome/browser/ui/browser_window.h" |
| 35 #include "chrome/browser/ui/chrome_pages.h" | 36 #include "chrome/browser/ui/chrome_pages.h" |
| 36 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 37 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 37 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h" | 38 #include "chrome/browser/ui/tabs/tab_strip_model_utils.h" |
| 38 #include "chrome/browser/ui/webui/inspect_ui.h" | 39 #include "chrome/browser/ui/webui/inspect_ui.h" |
| 39 #include "chrome/common/chrome_features.h" | 40 #include "chrome/common/chrome_features.h" |
| 40 #include "chrome/common/content_restriction.h" | 41 #include "chrome/common/content_restriction.h" |
| 41 #include "chrome/common/pref_names.h" | 42 #include "chrome/common/pref_names.h" |
| 42 #include "chrome/common/profiling.h" | 43 #include "chrome/common/profiling.h" |
| 43 #include "components/bookmarks/common/bookmark_pref_names.h" | 44 #include "components/bookmarks/common/bookmark_pref_names.h" |
| 44 #include "components/browser_sync/browser/profile_sync_service.h" | 45 #include "components/browser_sync/browser/profile_sync_service.h" |
| 45 #include "components/dom_distiller/core/dom_distiller_switches.h" | 46 #include "components/dom_distiller/core/dom_distiller_switches.h" |
| 46 #include "components/prefs/pref_service.h" | 47 #include "components/prefs/pref_service.h" |
| 47 #include "components/sessions/core/tab_restore_service.h" | 48 #include "components/sessions/core/tab_restore_service.h" |
| 48 #include "components/signin/core/common/signin_pref_names.h" | 49 #include "components/signin/core/common/signin_pref_names.h" |
| 49 #include "content/public/browser/native_web_keyboard_event.h" | 50 #include "content/public/browser/native_web_keyboard_event.h" |
| 50 #include "content/public/browser/navigation_controller.h" | 51 #include "content/public/browser/navigation_controller.h" |
| 51 #include "content/public/browser/navigation_entry.h" | 52 #include "content/public/browser/navigation_entry.h" |
| 52 #include "content/public/browser/user_metrics.h" | 53 #include "content/public/browser/user_metrics.h" |
| 53 #include "content/public/browser/web_contents.h" | 54 #include "content/public/browser/web_contents.h" |
| 54 #include "content/public/browser/web_contents_observer.h" | 55 #include "content/public/browser/web_contents_observer.h" |
| 56 #include "content/public/common/mojo_shell_connection.h" | |
| 55 #include "content/public/common/url_constants.h" | 57 #include "content/public/common/url_constants.h" |
| 56 #include "extensions/browser/extension_system.h" | 58 #include "extensions/browser/extension_system.h" |
| 59 #include "mash/public/interfaces/launchable.mojom.h" | |
| 60 #include "services/shell/public/cpp/connector.h" | |
| 57 #include "ui/events/keycodes/keyboard_codes.h" | 61 #include "ui/events/keycodes/keyboard_codes.h" |
| 58 | 62 |
| 59 #if defined(OS_MACOSX) | 63 #if defined(OS_MACOSX) |
| 60 #include "chrome/browser/ui/browser_commands_mac.h" | 64 #include "chrome/browser/ui/browser_commands_mac.h" |
| 61 #endif | 65 #endif |
| 62 | 66 |
| 63 #if defined(OS_WIN) | 67 #if defined(OS_WIN) |
| 64 #include "base/win/windows_version.h" | 68 #include "base/win/windows_version.h" |
| 65 #include "content/public/browser/gpu_data_manager.h" | 69 #include "content/public/browser/gpu_data_manager.h" |
| 66 #endif | 70 #endif |
| (...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 618 break; | 622 break; |
| 619 case IDC_SHOW_SIGNIN: | 623 case IDC_SHOW_SIGNIN: |
| 620 ShowBrowserSigninOrSettings( | 624 ShowBrowserSigninOrSettings( |
| 621 browser_, signin_metrics::AccessPoint::ACCESS_POINT_MENU); | 625 browser_, signin_metrics::AccessPoint::ACCESS_POINT_MENU); |
| 622 break; | 626 break; |
| 623 case IDC_DISTILL_PAGE: | 627 case IDC_DISTILL_PAGE: |
| 624 DistillCurrentPage(browser_); | 628 DistillCurrentPage(browser_); |
| 625 break; | 629 break; |
| 626 #if defined(OS_CHROMEOS) | 630 #if defined(OS_CHROMEOS) |
| 627 case IDC_TOUCH_HUD_PROJECTION_TOGGLE: | 631 case IDC_TOUCH_HUD_PROJECTION_TOGGLE: |
| 628 ash::accelerators::ToggleTouchHudProjection(); | 632 if (chrome::IsRunningInMash()) { |
| 633 shell::Connector* connector = | |
| 634 content::MojoShellConnection::GetForProcess()->GetConnector(); | |
| 635 mash::mojom::LaunchablePtr launchable; | |
| 636 connector->ConnectToInterface("mojo:touch_hud", &launchable); | |
| 637 launchable->Launch(mash::mojom::kWindow, | |
| 638 mash::mojom::LaunchMode::DEFAULT); | |
|
sadrul
2016/09/02 18:34:38
Does chrome's manifest not need to list touch-hud?
riajiang
2016/09/02 18:38:58
I added it here: https://codereview.chromium.org/2
| |
| 639 } else { | |
| 640 ash::accelerators::ToggleTouchHudProjection(); | |
| 641 } | |
| 629 break; | 642 break; |
| 630 #endif | 643 #endif |
| 631 case IDC_ROUTE_MEDIA: | 644 case IDC_ROUTE_MEDIA: |
| 632 RouteMedia(browser_); | 645 RouteMedia(browser_); |
| 633 break; | 646 break; |
| 634 | 647 |
| 635 default: | 648 default: |
| 636 LOG(WARNING) << "Received Unimplemented Command: " << id; | 649 LOG(WARNING) << "Received Unimplemented Command: " << id; |
| 637 break; | 650 break; |
| 638 } | 651 } |
| (...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1159 | 1172 |
| 1160 BrowserWindow* BrowserCommandController::window() { | 1173 BrowserWindow* BrowserCommandController::window() { |
| 1161 return browser_->window(); | 1174 return browser_->window(); |
| 1162 } | 1175 } |
| 1163 | 1176 |
| 1164 Profile* BrowserCommandController::profile() { | 1177 Profile* BrowserCommandController::profile() { |
| 1165 return browser_->profile(); | 1178 return browser_->profile(); |
| 1166 } | 1179 } |
| 1167 | 1180 |
| 1168 } // namespace chrome | 1181 } // namespace chrome |
| OLD | NEW |