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

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

Issue 10964007: Re-commit: 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: Windows only includes/pragma in the ifdef OS_WIN 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/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"
20 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
21 #include "content/public/browser/notification_details.h" 20 #include "content/public/browser/notification_details.h"
22 #include "content/public/browser/notification_registrar.h" 21 #include "content/public/browser/notification_registrar.h"
23 #include "content/public/browser/notification_source.h" 22 #include "content/public/browser/notification_source.h"
24 #include "content/public/browser/web_contents.h" 23 #include "content/public/browser/web_contents.h"
25 24
26 #if defined(OS_POSIX) && !defined(OS_MACOSX) 25 #if defined(OS_POSIX) && !defined(OS_MACOSX)
27 #include "base/environment.h" 26 #include "base/environment.h"
28 #endif 27 #endif
29 28
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); 183 DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
185 184
186 // Locations to check to shortcut_paths. 185 // Locations to check to shortcut_paths.
187 struct { 186 struct {
188 bool& use_this_location; 187 bool& use_this_location;
189 int location_id; 188 int location_id;
190 const wchar_t* sub_dir; 189 const wchar_t* sub_dir;
191 } locations[] = { 190 } locations[] = {
192 { 191 {
193 shortcut_info_.create_on_desktop, 192 shortcut_info_.create_on_desktop,
194 chrome::DIR_USER_DESKTOP, 193 base::DIR_USER_DESKTOP,
195 NULL 194 NULL
196 }, { 195 }, {
197 shortcut_info_.create_in_applications_menu, 196 shortcut_info_.create_in_applications_menu,
198 base::DIR_START_MENU, 197 base::DIR_START_MENU,
199 NULL 198 NULL
200 }, { 199 }, {
201 shortcut_info_.create_in_quick_launch_bar, 200 shortcut_info_.create_in_quick_launch_bar,
202 // For Win7, create_in_quick_launch_bar means pinning to taskbar. 201 // For Win7, create_in_quick_launch_bar means pinning to taskbar.
203 base::DIR_APP_DATA, 202 base::DIR_APP_DATA,
204 (base::win::GetVersion() >= base::win::VERSION_WIN7) ? 203 (base::win::GetVersion() >= base::win::VERSION_WIN7) ?
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 327
329 void UpdateShortcutForTabContents(TabContents* tab_contents) { 328 void UpdateShortcutForTabContents(TabContents* tab_contents) {
330 #if defined(OS_WIN) 329 #if defined(OS_WIN)
331 // UpdateShortcutWorker will delete itself when it's done. 330 // UpdateShortcutWorker will delete itself when it's done.
332 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents); 331 UpdateShortcutWorker* worker = new UpdateShortcutWorker(tab_contents);
333 worker->Run(); 332 worker->Run();
334 #endif // defined(OS_WIN) 333 #endif // defined(OS_WIN)
335 } 334 }
336 335
337 } // namespace web_app 336 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/test/ui_test_utils_win.cc ('k') | chrome/browser/web_applications/web_app_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698