| 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 1190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1201 RecordAppLaunch(browser_->profile(), node->url()); | 1201 RecordAppLaunch(browser_->profile(), node->url()); |
| 1202 OpenURLParams params( | 1202 OpenURLParams params( |
| 1203 node->url(), Referrer(), disposition_from_event_flags, | 1203 node->url(), Referrer(), disposition_from_event_flags, |
| 1204 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); | 1204 content::PAGE_TRANSITION_AUTO_BOOKMARK, false); |
| 1205 page_navigator_->OpenURL(params); | 1205 page_navigator_->OpenURL(params); |
| 1206 } else { | 1206 } else { |
| 1207 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, | 1207 chrome::OpenAll(GetWidget()->GetNativeWindow(), page_navigator_, node, |
| 1208 disposition_from_event_flags, browser_->profile()); | 1208 disposition_from_event_flags, browser_->profile()); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 RecordBookmarkLaunch(GetBookmarkLaunchLocation()); | 1211 RecordBookmarkLaunch(node, GetBookmarkLaunchLocation()); |
| 1212 } | 1212 } |
| 1213 | 1213 |
| 1214 void BookmarkBarView::ShowContextMenuForView(views::View* source, | 1214 void BookmarkBarView::ShowContextMenuForView(views::View* source, |
| 1215 const gfx::Point& point, | 1215 const gfx::Point& point, |
| 1216 ui::MenuSourceType source_type) { | 1216 ui::MenuSourceType source_type) { |
| 1217 if (!model_->loaded()) { | 1217 if (!model_->loaded()) { |
| 1218 // Don't do anything if the model isn't loaded. | 1218 // Don't do anything if the model isn't loaded. |
| 1219 return; | 1219 return; |
| 1220 } | 1220 } |
| 1221 | 1221 |
| (...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1852 DCHECK(apps_page_shortcut_); | 1852 DCHECK(apps_page_shortcut_); |
| 1853 // Only perform layout if required. | 1853 // Only perform layout if required. |
| 1854 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( | 1854 bool visible = chrome::ShouldShowAppsShortcutInBookmarkBar( |
| 1855 browser_->profile()); | 1855 browser_->profile()); |
| 1856 if (apps_page_shortcut_->visible() == visible) | 1856 if (apps_page_shortcut_->visible() == visible) |
| 1857 return; | 1857 return; |
| 1858 apps_page_shortcut_->SetVisible(visible); | 1858 apps_page_shortcut_->SetVisible(visible); |
| 1859 UpdateBookmarksSeparatorVisibility(); | 1859 UpdateBookmarksSeparatorVisibility(); |
| 1860 Layout(); | 1860 Layout(); |
| 1861 } | 1861 } |
| OLD | NEW |