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

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: correctly open browser if no one is present 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..94f35e8fa4cce06b17647f7e761924f3294c4578 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"
@@ -157,6 +162,30 @@ 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("https://support.google.com/chromebook/answer/183101"),
oshima 2015/09/08 19:06:47 define constant with a comprehensive name.
afakhry 2015/09/08 21:47:35 Done.
+ ui::PAGE_TRANSITION_AUTO_BOOKMARK);
+ params.disposition = SINGLETON_TAB;
+ chrome::Navigate(&params);
+}
+
+gfx::Image ChromeShellDelegate::GetDeprecatedAcceleratorImage() const {
oshima 2015/09/08 19:06:46 for ash specific code, you can just use gfx::Image
afakhry 2015/09/08 21:47:35 As we discussed Notification ctor needs an Image.
+ 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