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

Side by Side Diff: chrome/browser/chromeos/panels/panel_scroller.cc

Issue 6685069: Disambiguate OnMouseCaptureLost from OnMouseReleased, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments, fix tests, cleanup, etc. Created 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/chromeos/panels/panel_scroller.h" 5 #include "chrome/browser/chromeos/panels/panel_scroller.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/stl_util-inl.h" 9 #include "base/stl_util-inl.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 } 156 }
157 157
158 bool PanelScroller::OnMousePressed(const views::MouseEvent& event) { 158 bool PanelScroller::OnMousePressed(const views::MouseEvent& event) {
159 return true; 159 return true;
160 } 160 }
161 161
162 bool PanelScroller::OnMouseDragged(const views::MouseEvent& event) { 162 bool PanelScroller::OnMouseDragged(const views::MouseEvent& event) {
163 return true; 163 return true;
164 } 164 }
165 165
166 void PanelScroller::OnMouseReleased(const views::MouseEvent& event,
167 bool canceled) {
168 }
169
170 void PanelScroller::HeaderClicked(PanelScrollerHeader* source) { 166 void PanelScroller::HeaderClicked(PanelScrollerHeader* source) {
171 for (size_t i = 0; i < panels_.size(); i++) { 167 for (size_t i = 0; i < panels_.size(); i++) {
172 if (panels_[i]->header == source) { 168 if (panels_[i]->header == source) {
173 ScrollToPanel(static_cast<int>(i)); 169 ScrollToPanel(static_cast<int>(i));
174 return; 170 return;
175 } 171 }
176 } 172 }
177 NOTREACHED() << "Invalid panel passed to HeaderClicked."; 173 NOTREACHED() << "Invalid panel passed to HeaderClicked.";
178 } 174 }
179 175
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 } 236 }
241 237
242 void PanelScroller::AnimationProgressed(const ui::Animation* animation) { 238 void PanelScroller::AnimationProgressed(const ui::Animation* animation) {
243 scroll_pos_ = static_cast<int>( 239 scroll_pos_ = static_cast<int>(
244 static_cast<double>(animated_scroll_end_ - animated_scroll_begin_) * 240 static_cast<double>(animated_scroll_end_ - animated_scroll_begin_) *
245 animation_.GetCurrentValue()) + animated_scroll_begin_; 241 animation_.GetCurrentValue()) + animated_scroll_begin_;
246 242
247 Layout(); 243 Layout();
248 SchedulePaint(); 244 SchedulePaint();
249 } 245 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/panels/panel_scroller.h ('k') | chrome/browser/chromeos/panels/panel_scroller_header.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698