OLD | NEW |
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 if (!crosh_url.is_valid()) | 50 if (!crosh_url.is_valid()) |
51 return; | 51 return; |
52 chrome::ScopedTabbedBrowserDisplayer displayer( | 52 chrome::ScopedTabbedBrowserDisplayer displayer( |
53 profile, | 53 profile, |
54 chrome::HOST_DESKTOP_TYPE_ASH); | 54 chrome::HOST_DESKTOP_TYPE_ASH); |
55 Browser* browser = displayer.browser(); | 55 Browser* browser = displayer.browser(); |
56 content::WebContents* page = browser->OpenURL( | 56 content::WebContents* page = browser->OpenURL( |
57 content::OpenURLParams(crosh_url, | 57 content::OpenURLParams(crosh_url, |
58 content::Referrer(), | 58 content::Referrer(), |
59 NEW_FOREGROUND_TAB, | 59 NEW_FOREGROUND_TAB, |
60 content::PAGE_TRANSITION_GENERATED, | 60 ui::PAGE_TRANSITION_GENERATED, |
61 false)); | 61 false)); |
62 browser->window()->Show(); | 62 browser->window()->Show(); |
63 browser->window()->Activate(); | 63 browser->window()->Activate(); |
64 page->Focus(); | 64 page->Focus(); |
65 } | 65 } |
66 | 66 |
67 void ChromeNewWindowDelegateChromeos::ShowKeyboardOverlay() { | 67 void ChromeNewWindowDelegateChromeos::ShowKeyboardOverlay() { |
68 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222). | 68 // TODO(mazda): Move the show logic to ash (http://crbug.com/124222). |
69 Profile* profile = ProfileManager::GetActiveUserProfile(); | 69 Profile* profile = ProfileManager::GetActiveUserProfile(); |
70 std::string url(chrome::kChromeUIKeyboardOverlayURL); | 70 std::string url(chrome::kChromeUIKeyboardOverlayURL); |
71 ash::KeyboardOverlayView::ShowDialog(profile, | 71 ash::KeyboardOverlayView::ShowDialog(profile, |
72 new ChromeWebContentsHandler, | 72 new ChromeWebContentsHandler, |
73 GURL(url)); | 73 GURL(url)); |
74 } | 74 } |
OLD | NEW |