| 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 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 676 } | 675 } |
| 677 | 676 |
| 678 //------------------------------------------------------------------------------ | 677 //------------------------------------------------------------------------------ |
| 679 // NativeAppWindow::Create | 678 // NativeAppWindow::Create |
| 680 | 679 |
| 681 // static | 680 // static |
| 682 NativeAppWindow* NativeAppWindow::Create( | 681 NativeAppWindow* NativeAppWindow::Create( |
| 683 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { | 682 ShellWindow* shell_window, const ShellWindow::CreateParams& params) { |
| 684 return new NativeAppWindowViews(shell_window, params); | 683 return new NativeAppWindowViews(shell_window, params); |
| 685 } | 684 } |
| OLD | NEW |