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

Side by Side Diff: chrome/browser/ui/bookmarks/bookmark_utils.cc

Issue 1406613002: For some vector icons, get the size from the vector definition. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/ui/tabs/tab_utils.cc » ('j') | ui/gfx/paint_vector_icon.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/bookmarks/bookmark_utils.h" 5 #include "chrome/browser/ui/bookmarks/bookmark_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/prefs/pref_service.h" 9 #include "base/prefs/pref_service.h"
10 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 10 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 } 86 }
87 87
88 if (removed) 88 if (removed)
89 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED; 89 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED;
90 #endif 90 #endif
91 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED; 91 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED;
92 } 92 }
93 93
94 #if defined(TOOLKIT_VIEWS) 94 #if defined(TOOLKIT_VIEWS)
95 gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id) { 95 gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id) {
96 return gfx::CreateVectorIcon(id, 16, gfx::kChromeIconGrey); 96 return gfx::CreatePrimaryVectorIcon(id, gfx::kChromeIconGrey);
97 } 97 }
98 #endif 98 #endif
99 99
100 } // namespace 100 } // namespace
101 101
102 GURL GetURLToBookmark(content::WebContents* web_contents) { 102 GURL GetURLToBookmark(content::WebContents* web_contents) {
103 DCHECK(web_contents); 103 DCHECK(web_contents);
104 return search::IsInstantNTP(web_contents) ? GURL(kChromeUINewTabURL) 104 return search::IsInstantNTP(web_contents) ? GURL(kChromeUINewTabURL)
105 : web_contents->GetURL(); 105 : web_contents->GetURL();
106 } 106 }
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed( 316 return *ui::ResourceBundle::GetSharedInstance().GetImageSkiaNamed(
317 IDR_BOOKMARK_BAR_FOLDER_MANAGED); 317 IDR_BOOKMARK_BAR_FOLDER_MANAGED);
318 } 318 }
319 #endif 319 #endif
320 320
321 return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED); 321 return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED);
322 } 322 }
323 #endif 323 #endif
324 324
325 } // namespace chrome 325 } // namespace chrome
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/tabs/tab_utils.cc » ('j') | ui/gfx/paint_vector_icon.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698