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

Side by Side Diff: views/controls/button/text_button.cc

Issue 2741004: Makes it so child views of menuitemview can be traversed with the (Closed)
Patch Set: Tweaks Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "views/controls/button/text_button.h" 5 #include "views/controls/button/text_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "app/throb_animation.h" 9 #include "app/throb_animation.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 if (enabled != IsEnabled()) { 390 if (enabled != IsEnabled()) {
391 CustomButton::SetEnabled(enabled); 391 CustomButton::SetEnabled(enabled);
392 } 392 }
393 // We should always call UpdateColor() since the state of the button might be 393 // We should always call UpdateColor() since the state of the button might be
394 // changed by other functions like CustomButton::SetState(). 394 // changed by other functions like CustomButton::SetState().
395 UpdateColor(); 395 UpdateColor();
396 SchedulePaint(); 396 SchedulePaint();
397 } 397 }
398 398
399 bool TextButton::OnMousePressed(const MouseEvent& e) { 399 bool TextButton::OnMousePressed(const MouseEvent& e) {
400 RequestFocus(); 400 if (request_focus_on_press())
401 RequestFocus();
401 return true; 402 return true;
402 } 403 }
403 404
404 void TextButton::Paint(gfx::Canvas* canvas) { 405 void TextButton::Paint(gfx::Canvas* canvas) {
405 Paint(canvas, false); 406 Paint(canvas, false);
406 } 407 }
407 408
408 } // namespace views 409 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698