| 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 #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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |