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

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

Issue 1306873006: Fix mac_views_browser=1 compile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 5 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
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 "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 20 matching lines...) Expand all
31 #include "ui/base/dragdrop/drag_drop_types.h" 31 #include "ui/base/dragdrop/drag_drop_types.h"
32 #include "ui/base/dragdrop/drop_target_event.h" 32 #include "ui/base/dragdrop/drop_target_event.h"
33 #include "ui/base/l10n/l10n_util.h" 33 #include "ui/base/l10n/l10n_util.h"
34 34
35 #if defined(ENABLE_EXTENSIONS) 35 #if defined(ENABLE_EXTENSIONS)
36 #include "chrome/browser/extensions/api/commands/command_service.h" 36 #include "chrome/browser/extensions/api/commands/command_service.h"
37 #include "extensions/browser/extension_registry.h" 37 #include "extensions/browser/extension_registry.h"
38 #include "extensions/common/extension_set.h" 38 #include "extensions/common/extension_set.h"
39 #endif 39 #endif
40 40
41 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 41 #if defined(TOOLKIT_VIEWS)
42 #include "ui/gfx/paint_vector_icon.h" 42 #include "ui/gfx/paint_vector_icon.h"
43 #include "ui/gfx/vector_icons_public.h" 43 #include "ui/gfx/vector_icons_public.h"
44 #include "ui/native_theme/common_theme.h" 44 #include "ui/native_theme/common_theme.h"
45 #include "ui/native_theme/native_theme.h" 45 #include "ui/native_theme/native_theme.h"
46 #endif 46 #endif
47 47
48 using bookmarks::BookmarkModel; 48 using bookmarks::BookmarkModel;
49 using bookmarks::BookmarkNode; 49 using bookmarks::BookmarkNode;
50 50
51 namespace chrome { 51 namespace chrome {
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 removed = true; 197 removed = true;
198 } 198 }
199 } 199 }
200 200
201 if (removed) 201 if (removed)
202 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED; 202 return BOOKMARK_SHORTCUT_DISPOSITION_REMOVED;
203 #endif 203 #endif
204 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED; 204 return BOOKMARK_SHORTCUT_DISPOSITION_UNCHANGED;
205 } 205 }
206 206
207 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 207 #if defined(TOOLKIT_VIEWS)
208 gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id) { 208 gfx::ImageSkia GetFolderIcon(gfx::VectorIconId id) {
209 SkColor icon_color; 209 SkColor icon_color;
210 ui::CommonThemeGetSystemColor(ui::NativeTheme::kColorId_ChromeIconGrey, 210 ui::CommonThemeGetSystemColor(ui::NativeTheme::kColorId_ChromeIconGrey,
211 &icon_color); 211 &icon_color);
212 return gfx::CreateVectorIcon(id, 16, icon_color); 212 return gfx::CreateVectorIcon(id, 16, icon_color);
213 } 213 }
214 #endif 214 #endif
215 215
216 } // namespace 216 } // namespace
217 217
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 // drop_parent can't accept a child that is an ancestor. 490 // drop_parent can't accept a child that is an ancestor.
491 if (drop_parent->HasAncestor(node)) 491 if (drop_parent->HasAncestor(node))
492 return false; 492 return false;
493 } 493 }
494 return true; 494 return true;
495 } 495 }
496 // From another profile, always accept. 496 // From another profile, always accept.
497 return true; 497 return true;
498 } 498 }
499 499
500 #if !defined(OS_MACOSX) && !defined(OS_ANDROID) 500 #if defined(TOOLKIT_VIEWS)
501 gfx::ImageSkia GetBookmarkFolderIcon() { 501 gfx::ImageSkia GetBookmarkFolderIcon() {
502 return GetFolderIcon(gfx::VectorIconId::FOLDER); 502 return GetFolderIcon(gfx::VectorIconId::FOLDER);
503 } 503 }
504 504
505 gfx::ImageSkia GetBookmarkSupervisedFolderIcon() { 505 gfx::ImageSkia GetBookmarkSupervisedFolderIcon() {
506 return GetFolderIcon(gfx::VectorIconId::FOLDER_SUPERVISED); 506 return GetFolderIcon(gfx::VectorIconId::FOLDER_SUPERVISED);
507 } 507 }
508 508
509 gfx::ImageSkia GetBookmarkManagedFolderIcon() { 509 gfx::ImageSkia GetBookmarkManagedFolderIcon() {
510 return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED); 510 return GetFolderIcon(gfx::VectorIconId::FOLDER_MANAGED);
511 } 511 }
512 #endif 512 #endif
513 513
514 } // namespace chrome 514 } // namespace chrome
OLDNEW
« no previous file with comments | « chrome/browser/ui/bookmarks/bookmark_utils.h ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698