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

Unified Diff: chrome/browser/jumplist_win.h

Issue 168583011: Move Windows Jump List boilerplate out of jumplist_win for reuse (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed review comments Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/jumplist_updater_win.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/jumplist_win.h
diff --git a/chrome/browser/jumplist_win.h b/chrome/browser/jumplist_win.h
index f244053964b3f1088c3b8067841a5073edf6db7d..45efbbba90cfee94938341e5315fdcef8dbc4043 100644
--- a/chrome/browser/jumplist_win.h
+++ b/chrome/browser/jumplist_win.h
@@ -10,20 +10,16 @@
#include <utility>
#include <vector>
-#include "base/memory/ref_counted.h"
+#include "base/files/file_path.h"
#include "base/memory/weak_ptr.h"
#include "base/synchronization/lock.h"
#include "base/task/cancelable_task_tracker.h"
#include "chrome/browser/history/history_service.h"
#include "chrome/browser/history/history_types.h"
+#include "chrome/browser/jumplist_updater_win.h"
#include "chrome/browser/sessions/tab_restore_service.h"
#include "chrome/browser/sessions/tab_restore_service_observer.h"
#include "content/public/browser/browser_thread.h"
-#include "third_party/skia/include/core/SkBitmap.h"
-
-namespace base {
-class FilePath;
-}
namespace chrome {
struct FaviconImageResult;
@@ -36,69 +32,6 @@ class NotificationRegistrar;
class Profile;
class PageUsageData;
-// Represents a class used for creating an IShellLink object by the utility
-// functions in this file.
-// This class consists of three strings and a integer.
-// * arguments (std::wstring)
-// The arguments for the application.
-// * title (std::wstring)
-// The string to be displayed in a JumpList.
-// * icon (std::wstring)
-// The absolute path to an icon to be displayed in a JumpList.
-// * index (int)
-// The icon index in the icon file. If an icon file consists of two or more
-// icons, set this value to identify the icon. If an icon file consists of
-// one icon, this value is 0.
-// Even though an IShellLink also needs the absolute path to an application to
-// be executed, this class does not have any variables for it because our
-// utility functions always use "chrome.exe" as the application and we don't
-// need it.
-class ShellLinkItem : public base::RefCountedThreadSafe<ShellLinkItem> {
- public:
- ShellLinkItem() : index_(0), favicon_(false) {
- }
-
- const std::wstring& arguments() const { return arguments_; }
- const std::wstring& title() const { return title_; }
- const std::wstring& icon() const { return icon_; }
- int index() const { return index_; }
- const SkBitmap& data() const { return data_; }
-
- void SetArguments(const std::wstring& arguments) {
- arguments_ = arguments;
- }
-
- void SetTitle(const std::wstring& title) {
- title_ = title;
- }
-
- void SetIcon(const std::wstring& icon, int index, bool favicon) {
- icon_ = icon;
- index_ = index;
- favicon_ = favicon;
- }
-
- void SetIconData(const SkBitmap& data) {
- data_ = data;
- }
-
- private:
- friend class base::RefCountedThreadSafe<ShellLinkItem>;
-
- ~ShellLinkItem() {}
-
- std::wstring arguments_;
- std::wstring title_;
- std::wstring icon_;
- SkBitmap data_;
- int index_;
- bool favicon_;
-
- DISALLOW_COPY_AND_ASSIGN(ShellLinkItem);
-};
-
-typedef std::vector<scoped_refptr<ShellLinkItem> > ShellLinkItemList;
-
// A class which implements an application JumpList.
// This class encapsulates operations required for updating an application
// JumpList:
« no previous file with comments | « chrome/browser/jumplist_updater_win.cc ('k') | chrome/browser/jumplist_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698