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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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_delegate.h" 5 #include "chrome/browser/ui/ash/chrome_new_window_delegate.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 "ash/wm/window_util.h" 8 #include "ash/wm/window_util.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "chrome/browser/chromeos/file_manager/app_id.h" 10 #include "chrome/browser/chromeos/file_manager/app_id.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 return; 175 return;
176 176
177 if (service->IsLoaded()) { 177 if (service->IsLoaded()) {
178 RestoreTabUsingProfile(profile); 178 RestoreTabUsingProfile(profile);
179 } else { 179 } else {
180 tab_restore_helper_.reset(new TabRestoreHelper(this, profile, service)); 180 tab_restore_helper_.reset(new TabRestoreHelper(this, profile, service));
181 service->LoadTabsFromLastSession(); 181 service->LoadTabsFromLastSession();
182 } 182 }
183 } 183 }
184 184
185 void ChromeNewWindowDelegate::OpenNetworkDiag() {
186 Profile* profile = ProfileManager::GetActiveUserProfile();
187 std::string url =
188 "chrome-extension://idddmepepmjcgiedknnmlbadcokidhoa/index.html";
189 GURL net_diag_url = GURL(url);
190 if (!net_diag_url.is_valid())
191 return;
192 chrome::ScopedTabbedBrowserDisplayer displayer(profile);
193 Browser* browser = displayer.browser();
194 content::WebContents* page = browser->OpenURL(content::OpenURLParams(
195 net_diag_url, content::Referrer(), NEW_FOREGROUND_TAB,
196 ui::PAGE_TRANSITION_GENERATED, false));
197 browser->window()->Show();
198 browser->window()->Activate();
199 page->Focus();
200 }
201
185 void ChromeNewWindowDelegate::ShowKeyboardOverlay() { 202 void ChromeNewWindowDelegate::ShowKeyboardOverlay() {
186 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222). 203 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222).
187 Profile* profile = ProfileManager::GetActiveUserProfile(); 204 Profile* profile = ProfileManager::GetActiveUserProfile();
188 std::string url(chrome::kChromeUIKeyboardOverlayURL); 205 std::string url(chrome::kChromeUIKeyboardOverlayURL);
189 ash::KeyboardOverlayView::ShowDialog(profile, new ChromeWebContentsHandler, 206 ash::KeyboardOverlayView::ShowDialog(profile, new ChromeWebContentsHandler,
190 GURL(url)); 207 GURL(url));
191 } 208 }
192 209
193 void ChromeNewWindowDelegate::ShowTaskManager() { 210 void ChromeNewWindowDelegate::ShowTaskManager() {
194 chrome::OpenTaskManager(NULL); 211 chrome::OpenTaskManager(NULL);
195 } 212 }
196 213
197 void ChromeNewWindowDelegate::OpenFeedbackPage() { 214 void ChromeNewWindowDelegate::OpenFeedbackPage() {
198 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow()); 215 chrome::OpenFeedbackDialog(GetBrowserForActiveWindow());
199 } 216 }
OLDNEW
« 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