| 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 1136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1147 chrome::DispositionFromEventFlags(event.flags()); | 1147 chrome::DispositionFromEventFlags(event.flags()); |
| 1148 | 1148 |
| 1149 if (node->is_url()) { | 1149 if (node->is_url()) { |
| 1150 RecordAppLaunch(browser_->profile(), node->url()); | 1150 RecordAppLaunch(browser_->profile(), node->url()); |
| 1151 OpenURLParams params( | 1151 OpenURLParams params( |
| 1152 node->url(), Referrer(), disposition_from_event_flags, | 1152 node->url(), Referrer(), disposition_from_event_flags, |
| 1153 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); | 1153 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); |
| 1154 page_navigator_->OpenURL(params); | 1154 page_navigator_->OpenURL(params); |
| 1155 } else { | 1155 } else { |
| 1156 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, | 1156 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, |
| 1157 disposition_from_event_flags); | 1157 disposition_from_event_flags, browser_->profile()); |
| 1158 } | 1158 } |
| 1159 | 1159 |
| 1160 bookmark_utils::RecordBookmarkLaunch(IsDetached() ? | 1160 bookmark_utils::RecordBookmarkLaunch(IsDetached() ? |
| 1161 bookmark_utils::LAUNCH_DETACHED_BAR : | 1161 bookmark_utils::LAUNCH_DETACHED_BAR : |
| 1162 bookmark_utils::LAUNCH_ATTACHED_BAR); | 1162 bookmark_utils::LAUNCH_ATTACHED_BAR); |
| 1163 content::RecordAction(UserMetricsAction("ClickedBookmarkBarURLButton")); | 1163 content::RecordAction(UserMetricsAction("ClickedBookmarkBarURLButton")); |
| 1164 } | 1164 } |
| 1165 | 1165 |
| 1166 void BookmarkBarView::ShowContextMenuForView(views::View* source, | 1166 void BookmarkBarView::ShowContextMenuForView(views::View* source, |
| 1167 const gfx::Point& point) { | 1167 const gfx::Point& point) { |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1798 (1 - size_animation_->GetCurrentValue()))); | 1798 (1 - size_animation_->GetCurrentValue()))); |
| 1799 } else { | 1799 } else { |
| 1800 prefsize.set_height( | 1800 prefsize.set_height( |
| 1801 static_cast<int>( | 1801 static_cast<int>( |
| 1802 browser_defaults::kBookmarkBarHeight * | 1802 browser_defaults::kBookmarkBarHeight * |
| 1803 size_animation_->GetCurrentValue())); | 1803 size_animation_->GetCurrentValue())); |
| 1804 } | 1804 } |
| 1805 } | 1805 } |
| 1806 return prefsize; | 1806 return prefsize; |
| 1807 } | 1807 } |
| OLD | NEW |