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

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

Issue 2168143002: Adding keyboard shortcut BROWSE+SHIFT+N to launch 'Connectivity diag.' extension. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Changed key combo to browse shift N to avoid accidents. Created 4 years, 5 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_new_window_delegate.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/ash/chrome_new_window_delegate.cc
diff --git a/chrome/browser/ui/ash/chrome_new_window_delegate.cc b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
index 68ac5dfeab0a1085f796a1a58dc1c0fc9e7301f2..54940cffbef7b6eb49da5c5a23f62e106a50c1b3 100644
--- a/chrome/browser/ui/ash/chrome_new_window_delegate.cc
+++ b/chrome/browser/ui/ash/chrome_new_window_delegate.cc
@@ -182,6 +182,23 @@ void ChromeNewWindowDelegate::RestoreTab() {
}
}
+void ChromeNewWindowDelegate::OpenNetworkDiag() {
+ Profile* profile = ProfileManager::GetActiveUserProfile();
+ std::string url =
+ "chrome-extension://idddmepepmjcgiedknnmlbadcokidhoa/index.html";
+ GURL net_diag_url = GURL(url);
+ if (!net_diag_url.is_valid())
+ return;
+ chrome::ScopedTabbedBrowserDisplayer displayer(profile);
+ Browser* browser = displayer.browser();
+ content::WebContents* page = browser->OpenURL(content::OpenURLParams(
+ net_diag_url, content::Referrer(), NEW_FOREGROUND_TAB,
+ ui::PAGE_TRANSITION_GENERATED, false));
+ browser->window()->Show();
+ browser->window()->Activate();
+ page->Focus();
+}
+
void ChromeNewWindowDelegate::ShowKeyboardOverlay() {
// TODO(mazda): Move the show logic to ash (http://crbug.com/124222).
Profile* profile = ProfileManager::GetActiveUserProfile();
« no previous file with comments | « chrome/browser/ui/ash/chrome_new_window_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698