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

Side by Side Diff: chrome/browser/web_applications/web_app.cc

Issue 7011015: Show "About panel" bubble on Windows. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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
« no previous file with comments | « chrome/browser/web_applications/web_app.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/web_applications/web_app.h" 5 #include "chrome/browser/web_applications/web_app.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <shlobj.h> 8 #include <shlobj.h>
9 #endif // defined(OS_WIN) 9 #endif // defined(OS_WIN)
10 10
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
468 t.append(url.path()); 468 t.append(url.path());
469 return t; 469 return t;
470 } 470 }
471 471
472 std::string GenerateApplicationNameFromExtensionId(const std::string& id) { 472 std::string GenerateApplicationNameFromExtensionId(const std::string& id) {
473 std::string t(web_app::kCrxAppPrefix); 473 std::string t(web_app::kCrxAppPrefix);
474 t.append(id); 474 t.append(id);
475 return t; 475 return t;
476 } 476 }
477 477
478 std::string GetExtensionIdFromApplicationName(const std::string& app_name) {
479 std::string prefix(kCrxAppPrefix);
480 if (app_name.substr(0, prefix.length()) != prefix)
481 return std::string();
482 return app_name.substr(prefix.length());
483 }
484
478 void CreateShortcut( 485 void CreateShortcut(
479 const FilePath& data_dir, 486 const FilePath& data_dir,
480 const ShellIntegration::ShortcutInfo& shortcut_info, 487 const ShellIntegration::ShortcutInfo& shortcut_info,
481 CreateShortcutCallback* callback) { 488 CreateShortcutCallback* callback) {
482 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE, 489 BrowserThread::PostTask(BrowserThread::FILE, FROM_HERE,
483 new CreateShortcutTask(data_dir, shortcut_info, callback)); 490 new CreateShortcutTask(data_dir, shortcut_info, callback));
484 } 491 }
485 492
486 bool IsValidUrl(const GURL& url) { 493 bool IsValidUrl(const GURL& url) {
487 static const char* const kValidUrlSchemes[] = { 494 static const char* const kValidUrlSchemes[] = {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 530
524 #if defined(TOOLKIT_USES_GTK) 531 #if defined(TOOLKIT_USES_GTK)
525 std::string GetWMClassFromAppName(std::string app_name) { 532 std::string GetWMClassFromAppName(std::string app_name) {
526 file_util::ReplaceIllegalCharactersInPath(&app_name, '_'); 533 file_util::ReplaceIllegalCharactersInPath(&app_name, '_');
527 TrimString(app_name, "_", &app_name); 534 TrimString(app_name, "_", &app_name);
528 return app_name; 535 return app_name;
529 } 536 }
530 #endif 537 #endif
531 538
532 } // namespace web_app 539 } // namespace web_app
OLDNEW
« no previous file with comments | « chrome/browser/web_applications/web_app.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698