| 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <limits> | 8 #include <limits> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1138 if (sender->tag() == kOtherFolderButtonTag) { | 1138 if (sender->tag() == kOtherFolderButtonTag) { |
| 1139 node = model_->other_node(); | 1139 node = model_->other_node(); |
| 1140 } else { | 1140 } else { |
| 1141 int index = GetIndexOf(sender); | 1141 int index = GetIndexOf(sender); |
| 1142 DCHECK_NE(-1, index); | 1142 DCHECK_NE(-1, index); |
| 1143 node = model_->bookmark_bar_node()->GetChild(index); | 1143 node = model_->bookmark_bar_node()->GetChild(index); |
| 1144 } | 1144 } |
| 1145 DCHECK(page_navigator_); | 1145 DCHECK(page_navigator_); |
| 1146 | 1146 |
| 1147 WindowOpenDisposition disposition_from_event_flags = | 1147 WindowOpenDisposition disposition_from_event_flags = |
| 1148 chrome::DispositionFromEventFlags(sender->mouse_event_flags()); | 1148 chrome::DispositionFromEventFlags(event.flags()); |
| 1149 | 1149 |
| 1150 if (node->is_url()) { | 1150 if (node->is_url()) { |
| 1151 RecordAppLaunch(browser_->profile(), node->url()); | 1151 RecordAppLaunch(browser_->profile(), node->url()); |
| 1152 OpenURLParams params( | 1152 OpenURLParams params( |
| 1153 node->url(), Referrer(), disposition_from_event_flags, | 1153 node->url(), Referrer(), disposition_from_event_flags, |
| 1154 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); | 1154 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); |
| 1155 page_navigator_->OpenURL(params); | 1155 page_navigator_->OpenURL(params); |
| 1156 } else { | 1156 } else { |
| 1157 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, | 1157 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, |
| 1158 disposition_from_event_flags); | 1158 disposition_from_event_flags); |
| (...skipping 637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1796 (1 - size_animation_->GetCurrentValue()))); | 1796 (1 - size_animation_->GetCurrentValue()))); |
| 1797 } else { | 1797 } else { |
| 1798 prefsize.set_height( | 1798 prefsize.set_height( |
| 1799 static_cast<int>( | 1799 static_cast<int>( |
| 1800 browser_defaults::kBookmarkBarHeight * | 1800 browser_defaults::kBookmarkBarHeight * |
| 1801 size_animation_->GetCurrentValue())); | 1801 size_animation_->GetCurrentValue())); |
| 1802 } | 1802 } |
| 1803 } | 1803 } |
| 1804 return prefsize; | 1804 return prefsize; |
| 1805 } | 1805 } |
| OLD | NEW |