OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/extensions/native_app_window_views.h" | 5 #include "chrome/browser/ui/views/extensions/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 shortcut_info.url, | 89 shortcut_info.url, |
90 shortcut_info.extension_id, | 90 shortcut_info.extension_id, |
91 shortcut_info.profile_path); | 91 shortcut_info.profile_path); |
92 | 92 |
93 // TODO(benwells): Change this to use app_host.exe. | 93 // TODO(benwells): Change this to use app_host.exe. |
94 base::FilePath chrome_exe; | 94 base::FilePath chrome_exe; |
95 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { | 95 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
96 NOTREACHED(); | 96 NOTREACHED(); |
97 return; | 97 return; |
98 } | 98 } |
99 command_line.SetProgram(CommandLine::ForCurrentProcess()->GetProgram()); | 99 command_line.SetProgram(chrome_exe); |
100 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(), | 100 ui::win::SetRelaunchDetailsForWindow(command_line.GetCommandLineString(), |
101 shortcut_info.title, hwnd); | 101 shortcut_info.title, hwnd); |
102 | 102 |
103 if (!file_util::PathExists(web_app_path) && | 103 if (!file_util::PathExists(web_app_path) && |
104 !file_util::CreateDirectory(web_app_path)) { | 104 !file_util::CreateDirectory(web_app_path)) { |
105 return; | 105 return; |
106 } | 106 } |
107 ui::win::SetAppIconForWindow(icon_file.value(), hwnd); | 107 ui::win::SetAppIconForWindow(icon_file.value(), hwnd); |
108 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon); | 108 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon); |
109 } | 109 } |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
698 } | 698 } |
699 | 699 |
700 //------------------------------------------------------------------------------ | 700 //------------------------------------------------------------------------------ |
701 // NativeAppWindow::Create | 701 // NativeAppWindow::Create |
702 | 702 |
703 // static | 703 // static |
704 NativeAppWindow* NativeAppWindow::Create( | 704 NativeAppWindow* NativeAppWindow::Create( |
705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
706 return new NativeAppWindowViews(shell_window, params); | 706 return new NativeAppWindowViews(shell_window, params); |
707 } | 707 } |
OLD | NEW |