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

Side by Side Diff: ash/launcher/launcher_button.cc

Issue 9837001: Do not handle the button click event for the mouse release of dragging launcher item. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 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
« no previous file with comments | « no previous file | ash/launcher/launcher_view.cc » ('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 "ash/launcher/launcher_button.h" 5 #include "ash/launcher/launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "grit/ui_resources.h" 10 #include "grit/ui_resources.h"
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 return icon_view_->bounds(); 149 return icon_view_->bounds();
150 } 150 }
151 151
152 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { 152 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) {
153 CustomButton::OnMousePressed(event); 153 CustomButton::OnMousePressed(event);
154 host_->MousePressedOnButton(this, event); 154 host_->MousePressedOnButton(this, event);
155 return true; 155 return true;
156 } 156 }
157 157
158 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { 158 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) {
159 CustomButton::OnMouseReleased(event);
159 host_->MouseReleasedOnButton(this, false); 160 host_->MouseReleasedOnButton(this, false);
160 CustomButton::OnMouseReleased(event);
161 } 161 }
162 162
163 void LauncherButton::OnMouseCaptureLost() { 163 void LauncherButton::OnMouseCaptureLost() {
164 ClearState(STATE_HOVERED); 164 ClearState(STATE_HOVERED);
165 host_->MouseReleasedOnButton(this, true); 165 host_->MouseReleasedOnButton(this, true);
166 CustomButton::OnMouseCaptureLost(); 166 CustomButton::OnMouseCaptureLost();
167 } 167 }
168 168
169 bool LauncherButton::OnMouseDragged(const views::MouseEvent& event) { 169 bool LauncherButton::OnMouseDragged(const views::MouseEvent& event) {
170 CustomButton::OnMouseDragged(event); 170 CustomButton::OnMouseDragged(event);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING; 238 bar_id = IDR_AURA_LAUNCHER_UNDERLINE_RUNNING;
239 239
240 bar_->SetImage(rb.GetImageNamed(bar_id).ToSkBitmap()); 240 bar_->SetImage(rb.GetImageNamed(bar_id).ToSkBitmap());
241 } 241 }
242 242
243 Layout(); 243 Layout();
244 SchedulePaint(); 244 SchedulePaint();
245 } 245 }
246 } // namespace internal 246 } // namespace internal
247 } // namespace ash 247 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/launcher/launcher_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698