| 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 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ | 5 #ifndef CHROME_BROWSER_JUMPLIST_WIN_H_ |
| 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ | 6 #define CHROME_BROWSER_JUMPLIST_WIN_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <list> | 9 #include <list> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 // need it. | 45 // need it. |
| 46 class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> { | 46 class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> { |
| 47 public: | 47 public: |
| 48 ShellLinkItem() : index_(0), favicon_(false) { | 48 ShellLinkItem() : index_(0), favicon_(false) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 const std::wstring& arguments() const { return arguments_; } | 51 const std::wstring& arguments() const { return arguments_; } |
| 52 const std::wstring& title() const { return title_; } | 52 const std::wstring& title() const { return title_; } |
| 53 const std::wstring& icon() const { return icon_; } | 53 const std::wstring& icon() const { return icon_; } |
| 54 int index() const { return index_; } | 54 int index() const { return index_; } |
| 55 scoped_refptr<RefCountedMemory> data() const { return data_; } | 55 scoped_refptr<base::RefCountedMemory> data() const { return data_; } |
| 56 | 56 |
| 57 void SetArguments(const std::wstring& arguments) { | 57 void SetArguments(const std::wstring& arguments) { |
| 58 arguments_ = arguments; | 58 arguments_ = arguments; |
| 59 } | 59 } |
| 60 | 60 |
| 61 void SetTitle(const std::wstring& title) { | 61 void SetTitle(const std::wstring& title) { |
| 62 title_ = title; | 62 title_ = title; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void SetIcon(const std::wstring& icon, int index, bool favicon) { | 65 void SetIcon(const std::wstring& icon, int index, bool favicon) { |
| 66 icon_ = icon; | 66 icon_ = icon; |
| 67 index_ = index; | 67 index_ = index; |
| 68 favicon_ = favicon; | 68 favicon_ = favicon; |
| 69 } | 69 } |
| 70 | 70 |
| 71 void SetIconData(scoped_refptr<RefCountedMemory> data) { | 71 void SetIconData(scoped_refptr<base::RefCountedMemory> data) { |
| 72 data_ = data; | 72 data_ = data; |
| 73 } | 73 } |
| 74 | 74 |
| 75 private: | 75 private: |
| 76 friend class base::RefCountedThreadSafe<ShellLinkItem>; | 76 friend class base::RefCountedThreadSafe<ShellLinkItem>; |
| 77 | 77 |
| 78 ~ShellLinkItem() {} | 78 ~ShellLinkItem() {} |
| 79 | 79 |
| 80 std::wstring arguments_; | 80 std::wstring arguments_; |
| 81 std::wstring title_; | 81 std::wstring title_; |
| 82 std::wstring icon_; | 82 std::wstring icon_; |
| 83 scoped_refptr<RefCountedMemory> data_; | 83 scoped_refptr<base::RefCountedMemory> data_; |
| 84 int index_; | 84 int index_; |
| 85 bool favicon_; | 85 bool favicon_; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(ShellLinkItem); | 87 DISALLOW_COPY_AND_ASSIGN(ShellLinkItem); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 typedef std::vector<scoped_refptr<ShellLinkItem> > ShellLinkItemList; | 90 typedef std::vector<scoped_refptr<ShellLinkItem> > ShellLinkItemList; |
| 91 | 91 |
| 92 // A class which implements an application JumpList. | 92 // A class which implements an application JumpList. |
| 93 // This class encapsulates operations required for updating an application | 93 // This class encapsulates operations required for updating an application |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // Handle of last favicon request used to cancel if a new request | 232 // Handle of last favicon request used to cancel if a new request |
| 233 // comes in before the current one returns. | 233 // comes in before the current one returns. |
| 234 FaviconService::Handle handle_; | 234 FaviconService::Handle handle_; |
| 235 | 235 |
| 236 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ | 236 // Lock for most_visited_pages_, recently_closed_pages_, icon_urls_ |
| 237 // as they may be used by up to 3 threads. | 237 // as they may be used by up to 3 threads. |
| 238 base::Lock list_lock_; | 238 base::Lock list_lock_; |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ | 241 #endif // CHROME_BROWSER_JUMPLIST_WIN_H_ |
| OLD | NEW |