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

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

Issue 2512903002: Add bookmark bar/manager actions to track drag and drop. (Closed)
Patch Set: Created 4 years, 1 month 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
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/dnd.js ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
1173 } else if (drop_info_->location.on) { 1173 } else if (drop_info_->location.on) {
1174 parent_node = root->GetChild(index); 1174 parent_node = root->GetChild(index);
1175 index = parent_node->child_count(); 1175 index = parent_node->child_count();
1176 } else { 1176 } else {
1177 parent_node = root; 1177 parent_node = root;
1178 } 1178 }
1179 const BookmarkNodeData data = drop_info_->data; 1179 const BookmarkNodeData data = drop_info_->data;
1180 DCHECK(data.is_valid()); 1180 DCHECK(data.is_valid());
1181 bool copy = drop_info_->location.operation == ui::DragDropTypes::DRAG_COPY; 1181 bool copy = drop_info_->location.operation == ui::DragDropTypes::DRAG_COPY;
1182 drop_info_.reset(); 1182 drop_info_.reset();
1183
1184 content::RecordAction(base::UserMetricsAction("BookmarkBar_DragEnd"));
Alexei Svitkine (slow) 2016/11/18 16:52:15 Are you missing this in histograms.xml?
calamity 2016/11/21 00:49:58 This already exists in actions.xml, but was only i
Alexei Svitkine (slow) 2016/11/21 15:47:06 Ah, I see. It does not appear to have an owner or
calamity 2016/11/22 03:18:06 Done.
1183 return chrome::DropBookmarks( 1185 return chrome::DropBookmarks(
1184 browser_->profile(), data, parent_node, index, copy); 1186 browser_->profile(), data, parent_node, index, copy);
1185 } 1187 }
1186 1188
1187 void BookmarkBarView::OnThemeChanged() { 1189 void BookmarkBarView::OnThemeChanged() {
1188 UpdateAppearanceForTheme(); 1190 UpdateAppearanceForTheme();
1189 } 1191 }
1190 1192
1191 const char* BookmarkBarView::GetClassName() const { 1193 const char* BookmarkBarView::GetClassName() const {
1192 return kViewClassName; 1194 return kViewClassName;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2119 return; 2121 return;
2120 apps_page_shortcut_->SetVisible(visible); 2122 apps_page_shortcut_->SetVisible(visible);
2121 UpdateBookmarksSeparatorVisibility(); 2123 UpdateBookmarksSeparatorVisibility();
2122 LayoutAndPaint(); 2124 LayoutAndPaint();
2123 } 2125 }
2124 2126
2125 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2127 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2126 if (UpdateOtherAndManagedButtonsVisibility()) 2128 if (UpdateOtherAndManagedButtonsVisibility())
2127 LayoutAndPaint(); 2129 LayoutAndPaint();
2128 } 2130 }
OLDNEW
« no previous file with comments | « chrome/browser/resources/bookmark_manager/js/dnd.js ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698