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/web_applications/web_app_ui.h" | 5 #include "chrome/browser/ui/web_applications/web_app_ui.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/file_util.h" | 9 #include "base/file_util.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/string16.h" | 11 #include "base/string16.h" |
12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
13 #include "chrome/browser/extensions/tab_helper.h" | 13 #include "chrome/browser/extensions/tab_helper.h" |
14 #include "chrome/browser/favicon/favicon_tab_helper.h" | 14 #include "chrome/browser/favicon/favicon_tab_helper.h" |
15 #include "chrome/browser/profiles/profile.h" | 15 #include "chrome/browser/profiles/profile.h" |
16 #include "chrome/browser/ui/tab_contents/tab_contents.h" | 16 #include "chrome/browser/ui/tab_contents/tab_contents.h" |
17 #include "chrome/browser/web_applications/web_app.h" | 17 #include "chrome/browser/web_applications/web_app.h" |
18 #include "chrome/common/chrome_notification_types.h" | 18 #include "chrome/common/chrome_notification_types.h" |
| 19 #include "chrome/common/chrome_paths.h" |
19 #include "content/public/browser/browser_thread.h" | 20 #include "content/public/browser/browser_thread.h" |
20 #include "content/public/browser/notification_details.h" | 21 #include "content/public/browser/notification_details.h" |
21 #include "content/public/browser/notification_registrar.h" | 22 #include "content/public/browser/notification_registrar.h" |
22 #include "content/public/browser/notification_source.h" | 23 #include "content/public/browser/notification_source.h" |
23 #include "content/public/browser/web_contents.h" | 24 #include "content/public/browser/web_contents.h" |
24 | 25 |
25 #if defined(OS_POSIX) && !defined(OS_MACOSX) | 26 #if defined(OS_POSIX) && !defined(OS_MACOSX) |
26 #include "base/environment.h" | 27 #include "base/environment.h" |
27 #endif | 28 #endif |
28 | 29 |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); | 184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); |
184 | 185 |
185 // Locations to check to shortcut_paths. | 186 // Locations to check to shortcut_paths. |
186 struct { | 187 struct { |
187 bool& use_this_location; | 188 bool& use_this_location; |
188 int location_id; | 189 int location_id; |
189 const wchar_t* sub_dir; | 190 const wchar_t* sub_dir; |
190 } locations[] = { | 191 } locations[] = { |
191 { | 192 { |
192 shortcut_info_.create_on_desktop, | 193 shortcut_info_.create_on_desktop, |
193 base::DIR_USER_DESKTOP, | 194 chrome::DIR_USER_DESKTOP, |
194 NULL | 195 NULL |
195 }, { | 196 }, { |
196 shortcut_info_.create_in_applications_menu, | 197 shortcut_info_.create_in_applications_menu, |
197 base::DIR_START_MENU, | 198 base::DIR_START_MENU, |
198 NULL | 199 NULL |
199 }, { | 200 }, { |
200 shortcut_info_.create_in_quick_launch_bar, | 201 shortcut_info_.create_in_quick_launch_bar, |
201 // For Win7, create_in_quick_launch_bar means pinning to taskbar. | 202 // For Win7, create_in_quick_launch_bar means pinning to taskbar. |
202 base::DIR_APP_DATA, | 203 base::DIR_APP_DATA, |
203 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? | 204 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
327 | 328 |
328 void UpdateShortcutForTabContents(TabContents* tab_contents) { | 329 void UpdateShortcutForTabContents(TabContents* tab_contents) { |
329 #if defined(OS_WIN) | 330 #if defined(OS_WIN) |
330 // UpdateShortcutWorker will delete itself when it's done. | 331 // UpdateShortcutWorker will delete itself when it's done. |
331 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); | 332 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); |
332 worker->Run(); | 333 worker->Run(); |
333 #endif // defined(OS_WIN) | 334 #endif // defined(OS_WIN) |
334 } | 335 } |
335 | 336 |
336 } // namespace web_app | 337 } // namespace web_app |
OLD | NEW |