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/views/apps/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/apps/native_app_window_views.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "base/threading/sequenced_worker_pool.h" | 10 #include "base/threading/sequenced_worker_pool.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 const HWND hwnd) { | 89 const HWND hwnd) { |
90 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); | 90 DCHECK(content::BrowserThread::GetBlockingPool()->RunsTasksOnCurrentThread()); |
91 | 91 |
92 // Set the relaunch data so "Pin this program to taskbar" has the app's | 92 // Set the relaunch data so "Pin this program to taskbar" has the app's |
93 // information. | 93 // information. |
94 CommandLine command_line = ShellIntegration::CommandLineArgsForLauncher( | 94 CommandLine command_line = ShellIntegration::CommandLineArgsForLauncher( |
95 shortcut_info.url, | 95 shortcut_info.url, |
96 shortcut_info.extension_id, | 96 shortcut_info.extension_id, |
97 shortcut_info.profile_path); | 97 shortcut_info.profile_path); |
98 | 98 |
99 // TODO(benwells): Change this to use app_host.exe. | |
100 base::FilePath chrome_exe; | 99 base::FilePath chrome_exe; |
101 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { | 100 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
102 NOTREACHED(); | 101 NOTREACHED(); |
103 return; | 102 return; |
104 } | 103 } |
105 command_line.SetProgram(chrome_exe); | 104 command_line.SetProgram(chrome_exe); |
106 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(), | 105 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(), |
107 shortcut_info.title, hwnd); | 106 shortcut_info.title, hwnd); |
108 | 107 |
109 if (!base::PathExists(web_app_path) && | 108 if (!base::PathExists(web_app_path) && |
(...skipping 656 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
766 | 765 |
767 void NativeAppWindowViews::HandleKeyboardEvent( | 766 void NativeAppWindowViews::HandleKeyboardEvent( |
768 const content::NativeWebKeyboardEvent& event) { | 767 const content::NativeWebKeyboardEvent& event) { |
769 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, | 768 unhandled_keyboard_event_handler_.HandleKeyboardEvent(event, |
770 GetFocusManager()); | 769 GetFocusManager()); |
771 } | 770 } |
772 | 771 |
773 void NativeAppWindowViews::RenderViewHostChanged() { | 772 void NativeAppWindowViews::RenderViewHostChanged() { |
774 OnViewWasResized(); | 773 OnViewWasResized(); |
775 } | 774 } |
OLD | NEW |