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

Side by Side Diff: chrome/browser/ui/views/toolbar/browser_actions_container.cc

Issue 328993002: Ensure that the size passed down to the SetDragImageOnDataObject function called from drag_utils::S… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed parentheses and fixed alignment Created 6 years, 6 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/toolbar/browser_actions_container.h" 5 #include "chrome/browser/ui/views/toolbar/browser_actions_container.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/stl_util.h" 9 #include "base/stl_util.h"
10 #include "chrome/browser/extensions/extension_service.h" 10 #include "chrome/browser/extensions/extension_service.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 void BrowserActionsContainer::WriteDragDataForView(View* sender, 420 void BrowserActionsContainer::WriteDragDataForView(View* sender,
421 const gfx::Point& press_pt, 421 const gfx::Point& press_pt,
422 OSExchangeData* data) { 422 OSExchangeData* data) {
423 DCHECK(data); 423 DCHECK(data);
424 424
425 for (size_t i = 0; i < browser_action_views_.size(); ++i) { 425 for (size_t i = 0; i < browser_action_views_.size(); ++i) {
426 BrowserActionButton* button = browser_action_views_[i]->button(); 426 BrowserActionButton* button = browser_action_views_[i]->button();
427 if (button == sender) { 427 if (button == sender) {
428 // Set the dragging image for the icon. 428 // Set the dragging image for the icon.
429 gfx::ImageSkia badge(browser_action_views_[i]->GetIconWithBadge()); 429 gfx::ImageSkia badge(browser_action_views_[i]->GetIconWithBadge());
430 drag_utils::SetDragImageOnDataObject(badge, button->size(), 430 drag_utils::SetDragImageOnDataObject(badge,
431 press_pt.OffsetFromOrigin(), 431 press_pt.OffsetFromOrigin(),
432 data); 432 data);
433 433
434 // Fill in the remaining info. 434 // Fill in the remaining info.
435 BrowserActionDragData drag_data( 435 BrowserActionDragData drag_data(
436 browser_action_views_[i]->button()->extension()->id(), i); 436 browser_action_views_[i]->button()->extension()->id(), i);
437 drag_data.Write(profile_, data); 437 drag_data.Write(profile_, data);
438 break; 438 break;
439 } 439 }
440 } 440 }
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 views::BubbleBorder::TOP_RIGHT, 932 views::BubbleBorder::TOP_RIGHT,
933 show_action); 933 show_action);
934 popup_->GetWidget()->AddObserver(this); 934 popup_->GetWidget()->AddObserver(this);
935 popup_button_ = button; 935 popup_button_ = button;
936 936
937 // Only set button as pushed if it was triggered by a user click. 937 // Only set button as pushed if it was triggered by a user click.
938 if (should_grant) 938 if (should_grant)
939 popup_button_->SetButtonPushed(); 939 popup_button_->SetButtonPushed();
940 return true; 940 return true;
941 } 941 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | content/browser/web_contents/web_contents_view_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698