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

Unified Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 1177773002: Deprecating high-conflict accelerators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: oshima's comments Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_shell_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_shell_delegate.cc b/chrome/browser/ui/ash/chrome_shell_delegate.cc
index 612c61f8120628ddf2357f6b31686daf3da9fbd5..abd0dd78234542ed49f1a38bdf23286d10fae756 100644
--- a/chrome/browser/ui/ash/chrome_shell_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_shell_delegate.cc
@@ -17,9 +17,14 @@
#include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
#include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
#include "chrome/browser/ui/browser_commands.h"
+#include "chrome/browser/ui/browser_finder.h"
+#include "chrome/browser/ui/browser_navigator.h"
+#include "chrome/browser/ui/browser_window.h"
#include "chrome/grit/chromium_strings.h"
#include "components/signin/core/common/profile_management_switches.h"
+#include "grit/theme_resources.h"
#include "ui/base/l10n/l10n_util.h"
+#include "ui/base/resource/resource_bundle.h"
#if defined(OS_CHROMEOS)
#include "base/prefs/pref_service.h"
@@ -32,6 +37,13 @@
#include "components/user_manager/user_manager.h"
#endif
+namespace {
+
+const char kKeyboardShortcutHelpPageUrl[] =
+ "https://support.google.com/chromebook/answer/183101";
+
+} // namespace
+
// static
ChromeShellDelegate* ChromeShellDelegate::instance_ = NULL;
@@ -157,6 +169,29 @@ base::string16 ChromeShellDelegate::GetProductName() const {
return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME);
}
+void ChromeShellDelegate::OpenKeyboardShortcutHelpPage() const {
+ Profile* profile = ProfileManager::GetActiveUserProfile();
+ Browser* browser =
+ chrome::FindTabbedBrowser(profile, false, chrome::HOST_DESKTOP_TYPE_ASH);
+
+ if (!browser) {
+ browser = new Browser(
+ Browser::CreateParams(profile, chrome::HOST_DESKTOP_TYPE_ASH));
+ browser->window()->Activate();
+ browser->window()->Show();
+ }
+
+ chrome::NavigateParams params(browser, GURL(kKeyboardShortcutHelpPageUrl),
+ ui::PAGE_TRANSITION_AUTO_BOOKMARK);
+ params.disposition = SINGLETON_TAB;
+ chrome::Navigate(&params);
+}
+
+gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const {
+ return ui::ResourceBundle::GetSharedInstance().GetImageNamed(
+ IDR_BLUETOOTH_KEYBOARD);
+}
+
keyboard::KeyboardControllerProxy*
ChromeShellDelegate::CreateKeyboardControllerProxy() {
return new AshKeyboardControllerProxy(
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/views/accelerator_table.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698