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

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: own BookmarkBar_DragEnd Created 4 years 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 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1195 } else if (drop_info_->location.on) { 1195 } else if (drop_info_->location.on) {
1196 parent_node = root->GetChild(index); 1196 parent_node = root->GetChild(index);
1197 index = parent_node->child_count(); 1197 index = parent_node->child_count();
1198 } else { 1198 } else {
1199 parent_node = root; 1199 parent_node = root;
1200 } 1200 }
1201 const BookmarkNodeData data = drop_info_->data; 1201 const BookmarkNodeData data = drop_info_->data;
1202 DCHECK(data.is_valid()); 1202 DCHECK(data.is_valid());
1203 bool copy = drop_info_->location.operation == ui::DragDropTypes::DRAG_COPY; 1203 bool copy = drop_info_->location.operation == ui::DragDropTypes::DRAG_COPY;
1204 drop_info_.reset(); 1204 drop_info_.reset();
1205
1206 content::RecordAction(base::UserMetricsAction("BookmarkBar_DragEnd"));
1205 return chrome::DropBookmarks( 1207 return chrome::DropBookmarks(
1206 browser_->profile(), data, parent_node, index, copy); 1208 browser_->profile(), data, parent_node, index, copy);
1207 } 1209 }
1208 1210
1209 void BookmarkBarView::OnThemeChanged() { 1211 void BookmarkBarView::OnThemeChanged() {
1210 UpdateAppearanceForTheme(); 1212 UpdateAppearanceForTheme();
1211 } 1213 }
1212 1214
1213 const char* BookmarkBarView::GetClassName() const { 1215 const char* BookmarkBarView::GetClassName() const {
1214 return kViewClassName; 1216 return kViewClassName;
(...skipping 926 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 return; 2143 return;
2142 apps_page_shortcut_->SetVisible(visible); 2144 apps_page_shortcut_->SetVisible(visible);
2143 UpdateBookmarksSeparatorVisibility(); 2145 UpdateBookmarksSeparatorVisibility();
2144 LayoutAndPaint(); 2146 LayoutAndPaint();
2145 } 2147 }
2146 2148
2147 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() { 2149 void BookmarkBarView::OnShowManagedBookmarksPrefChanged() {
2148 if (UpdateOtherAndManagedButtonsVisibility()) 2150 if (UpdateOtherAndManagedButtonsVisibility())
2149 LayoutAndPaint(); 2151 LayoutAndPaint();
2150 } 2152 }
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