Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(571)

Side by Side Diff: chrome/browser/ui/web_applications/web_app_ui.cc

Issue 10910209: Add new PathService paths for Windows' All Users Desktop and Quick Launch folders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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/base_paths.h"
7 #include "base/bind.h" 8 #include "base/bind.h"
8 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
9 #include "base/file_util.h" 10 #include "base/file_util.h"
10 #include "base/path_service.h" 11 #include "base/path_service.h"
11 #include "base/string16.h" 12 #include "base/string16.h"
12 #include "base/utf_string_conversions.h" 13 #include "base/utf_string_conversions.h"
13 #include "chrome/browser/extensions/tab_helper.h" 14 #include "chrome/browser/extensions/tab_helper.h"
14 #include "chrome/browser/favicon/favicon_tab_helper.h" 15 #include "chrome/browser/favicon/favicon_tab_helper.h"
15 #include "chrome/browser/profiles/profile.h" 16 #include "chrome/browser/profiles/profile.h"
16 #include "chrome/browser/ui/tab_contents/tab_contents.h" 17 #include "chrome/browser/ui/tab_contents/tab_contents.h"
17 #include "chrome/browser/web_applications/web_app.h" 18 #include "chrome/browser/web_applications/web_app.h"
18 #include "chrome/common/chrome_notification_types.h" 19 #include "chrome/common/chrome_notification_types.h"
19 #include "chrome/common/chrome_paths.h"
20 #include "content/public/browser/browser_thread.h" 20 #include "content/public/browser/browser_thread.h"
21 #include "content/public/browser/notification_details.h" 21 #include "content/public/browser/notification_details.h"
22 #include "content/public/browser/notification_registrar.h" 22 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/notification_source.h" 23 #include "content/public/browser/notification_source.h"
24 #include "content/public/browser/web_contents.h" 24 #include "content/public/browser/web_contents.h"
25 25
26 #if defined(OS_POSIX) && !defined(OS_MACOSX) 26 #if defined(OS_POSIX) && !defined(OS_MACOSX)
27 #include "base/environment.h" 27 #include "base/environment.h"
28 #endif 28 #endif
29 29
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 180 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
181 181
182 // Locations to check to shortcut_paths. 182 // Locations to check to shortcut_paths.
183 struct { 183 struct {
184 bool& use_this_location; 184 bool& use_this_location;
185 int location_id; 185 int location_id;
186 const wchar_t* sub_dir; 186 const wchar_t* sub_dir;
187 } locations[] = { 187 } locations[] = {
188 { 188 {
189 shortcut_info_.create_on_desktop, 189 shortcut_info_.create_on_desktop,
190 chrome::DIR_USER_DESKTOP, 190 base::DIR_USER_DESKTOP,
191 NULL 191 NULL
192 }, { 192 }, {
193 shortcut_info_.create_in_applications_menu, 193 shortcut_info_.create_in_applications_menu,
194 base::DIR_START_MENU, 194 base::DIR_START_MENU,
195 NULL 195 NULL
196 }, { 196 }, {
197 shortcut_info_.create_in_quick_launch_bar, 197 shortcut_info_.create_in_quick_launch_bar,
198 // For Win7, create_in_quick_launch_bar means pinning to taskbar. 198 // For Win7, create_in_quick_launch_bar means pinning to taskbar.
199 base::DIR_APP_DATA, 199 base::DIR_APP_DATA,
200 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? 200 (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 void UpdateShortcutForTabContents(TabContents* tab_contents) { 324 void UpdateShortcutForTabContents(TabContents* tab_contents) {
325 #if defined(OS_WIN) 325 #if defined(OS_WIN)
326 // UpdateShortcutWorker will delete itself when it's done. 326 // UpdateShortcutWorker will delete itself when it's done.
327 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); 327 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents);
328 worker->Run(); 328 worker->Run();
329 #endif // defined(OS_WIN) 329 #endif // defined(OS_WIN)
330 } 330 }
331 331
332 } // namespace web_app 332 } // namespace web_app
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698