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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 } | 98 } |
99 command_line.SetProgram(CommandLine::ForCurrentProcess()->GetProgram()); | 99 command_line.SetProgram(CommandLine::ForCurrentProcess()->GetProgram()); |
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, | 108 web_app::internals::CheckAndSaveIcon(icon_file, shortcut_info.favicon); |
109 *shortcut_info.favicon.ToSkBitmap()); | |
110 } | 109 } |
111 #endif | 110 #endif |
112 | 111 |
113 } // namespace | 112 } // namespace |
114 | 113 |
115 NativeAppWindowViews::NativeAppWindowViews( | 114 NativeAppWindowViews::NativeAppWindowViews( |
116 ShellWindow* shell_window, | 115 ShellWindow* shell_window, |
117 const ShellWindow::CreateParams& create_params) | 116 const ShellWindow::CreateParams& create_params) |
118 : shell_window_(shell_window), | 117 : shell_window_(shell_window), |
119 web_view_(NULL), | 118 web_view_(NULL), |
(...skipping 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 } | 698 } |
700 | 699 |
701 //------------------------------------------------------------------------------ | 700 //------------------------------------------------------------------------------ |
702 // NativeAppWindow::Create | 701 // NativeAppWindow::Create |
703 | 702 |
704 // static | 703 // static |
705 NativeAppWindow* NativeAppWindow::Create( | 704 NativeAppWindow* NativeAppWindow::Create( |
706 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 705 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
707 return new NativeAppWindowViews(shell_window, params); | 706 return new NativeAppWindowViews(shell_window, params); |
708 } | 707 } |
OLD | NEW |