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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc

Issue 2750253002: Reland 4e4eae4cbe6136b538a: Make download item drags look like bookmark (Closed)
Patch Set: with fix Created 3 years, 9 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/views/bookmarks/bookmark_bar_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bar_view.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <limits> 10 #include <limits>
(...skipping 1393 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 const gfx::Image& image = model_->GetFavicon(node); 1404 const gfx::Image& image = model_->GetFavicon(node);
1405 icon = image.IsEmpty() ? *GetImageSkiaNamed(IDR_DEFAULT_FAVICON) 1405 icon = image.IsEmpty() ? *GetImageSkiaNamed(IDR_DEFAULT_FAVICON)
1406 : image.AsImageSkia(); 1406 : image.AsImageSkia();
1407 } else { 1407 } else {
1408 icon = chrome::GetBookmarkFolderIcon( 1408 icon = chrome::GetBookmarkFolderIcon(
1409 widget->GetNativeTheme()->GetSystemColor( 1409 widget->GetNativeTheme()->GetSystemColor(
1410 ui::NativeTheme::kColorId_LabelEnabledColor)); 1410 ui::NativeTheme::kColorId_LabelEnabledColor));
1411 } 1411 }
1412 1412
1413 button_drag_utils::SetDragImage(node->url(), node->GetTitle(), icon, 1413 button_drag_utils::SetDragImage(node->url(), node->GetTitle(), icon,
1414 &press_pt, data, widget); 1414 &press_pt, *widget, data);
1415 WriteBookmarkDragData(node, data); 1415 WriteBookmarkDragData(node, data);
1416 return; 1416 return;
1417 } 1417 }
1418 } 1418 }
1419 NOTREACHED(); 1419 NOTREACHED();
1420 } 1420 }
1421 1421
1422 int BookmarkBarView::GetDragOperationsForView(View* sender, 1422 int BookmarkBarView::GetDragOperationsForView(View* sender,
1423 const gfx::Point& p) { 1423 const gfx::Point& p) {
1424 if (size_animation_.is_animating() || 1424 if (size_animation_.is_animating() ||
(...skipping 722 matching lines...) Expand 10 before | Expand all | Expand 10 after
2147 return; 2147 return;
2148 apps_page_shortcut_->SetVisible(visible); 2148 apps_page_shortcut_->SetVisible(visible);
2149 UpdateBookmarksSeparatorVisibility(); 2149 UpdateBookmarksSeparatorVisibility();
2150 LayoutAndPaint(); 2150 LayoutAndPaint();
2151 } 2151 }
2152 2152
2153 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2153 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2154 if (UpdateOtherAndManagedButtonsVisibility()) 2154 if (UpdateOtherAndManagedButtonsVisibility())
2155 LayoutAndPaint(); 2155 LayoutAndPaint();
2156 } 2156 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698