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

Side by Side Diff: chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.cc

Issue 1149263003: Add user_gesture param to BaseWindow::Activate Base URL: https://chromium.googlesource.com/chromium/src.git@ug2_WebContentsDelegate_ActivateContents
Patch Set: Update callers Created 5 years, 7 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
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_chromeos.h" 5 #include "chrome/browser/ui/ash/chrome_new_window_delegate_chromeos.h"
6 6
7 #include "ash/keyboard_overlay/keyboard_overlay_view.h" 7 #include "ash/keyboard_overlay/keyboard_overlay_view.h"
8 #include "chrome/browser/chromeos/file_manager/app_id.h" 8 #include "chrome/browser/chromeos/file_manager/app_id.h"
9 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" 9 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 profile, 60 profile,
61 chrome::HOST_DESKTOP_TYPE_ASH); 61 chrome::HOST_DESKTOP_TYPE_ASH);
62 Browser* browser = displayer.browser(); 62 Browser* browser = displayer.browser();
63 content::WebContents* page = browser->OpenURL( 63 content::WebContents* page = browser->OpenURL(
64 content::OpenURLParams(crosh_url, 64 content::OpenURLParams(crosh_url,
65 content::Referrer(), 65 content::Referrer(),
66 NEW_FOREGROUND_TAB, 66 NEW_FOREGROUND_TAB,
67 ui::PAGE_TRANSITION_GENERATED, 67 ui::PAGE_TRANSITION_GENERATED,
68 false)); 68 false));
69 browser->window()->Show(); 69 browser->window()->Show();
70 browser->window()->Activate(); 70 browser->window()->Activate(true /* user_gesture */);
71 page->Focus(); 71 page->Focus();
72 } 72 }
73 73
74 void ChromeNewWindowDelegateChromeos::ShowKeyboardOverlay() { 74 void ChromeNewWindowDelegateChromeos::ShowKeyboardOverlay() {
75 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222). 75 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222).
76 Profile* profile = ProfileManager::GetActiveUserProfile(); 76 Profile* profile = ProfileManager::GetActiveUserProfile();
77 std::string url(chrome::kChromeUIKeyboardOverlayURL); 77 std::string url(chrome::kChromeUIKeyboardOverlayURL);
78 ash::KeyboardOverlayView::ShowDialog(profile, 78 ash::KeyboardOverlayView::ShowDialog(profile,
79 new ChromeWebContentsHandler, 79 new ChromeWebContentsHandler,
80 GURL(url)); 80 GURL(url));
81 } 81 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698