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

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

Issue 690653003: Fix button state for dragged browser action buttons (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_action_view.h" 5 #include "chrome/browser/ui/views/toolbar/browser_action_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "chrome/browser/chrome_notification_types.h" 9 #include "chrome/browser/chrome_notification_types.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 const ViewHierarchyChangedDetails& details) { 72 const ViewHierarchyChangedDetails& details) {
73 if (details.is_add && !called_register_command_ && GetFocusManager()) { 73 if (details.is_add && !called_register_command_ && GetFocusManager()) {
74 view_controller_->RegisterCommand(); 74 view_controller_->RegisterCommand();
75 called_register_command_ = true; 75 called_register_command_ = true;
76 } 76 }
77 77
78 MenuButton::ViewHierarchyChanged(details); 78 MenuButton::ViewHierarchyChanged(details);
79 } 79 }
80 80
81 void BrowserActionView::OnDragDone() { 81 void BrowserActionView::OnDragDone() {
82 views::MenuButton::OnDragDone();
82 delegate_->OnBrowserActionViewDragDone(); 83 delegate_->OnBrowserActionViewDragDone();
83 } 84 }
84 85
85 gfx::Size BrowserActionView::GetPreferredSize() const { 86 gfx::Size BrowserActionView::GetPreferredSize() const {
86 return gfx::Size(BrowserActionsContainer::IconWidth(false), 87 return gfx::Size(BrowserActionsContainer::IconWidth(false),
87 BrowserActionsContainer::IconHeight()); 88 BrowserActionsContainer::IconHeight());
88 } 89 }
89 90
90 void BrowserActionView::PaintChildren(gfx::Canvas* canvas, 91 void BrowserActionView::PaintChildren(gfx::Canvas* canvas,
91 const views::CullSet& cull_set) { 92 const views::CullSet& cull_set) {
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
274 } 275 }
275 276
276 void BrowserActionView::CleanupPopup() { 277 void BrowserActionView::CleanupPopup() {
277 // We need to do these actions synchronously (instead of closing and then 278 // We need to do these actions synchronously (instead of closing and then
278 // performing the rest of the cleanup in OnWidgetDestroyed()) because 279 // performing the rest of the cleanup in OnWidgetDestroyed()) because
279 // OnWidgetDestroyed() can be called asynchronously from Close(), and we need 280 // OnWidgetDestroyed() can be called asynchronously from Close(), and we need
280 // to keep the delegate's popup owner up-to-date. 281 // to keep the delegate's popup owner up-to-date.
281 delegate_->SetPopupOwner(NULL); 282 delegate_->SetPopupOwner(NULL);
282 pressed_lock_.reset(); // Unpress the menu button if it was pressed. 283 pressed_lock_.reset(); // Unpress the menu button if it was pressed.
283 } 284 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698