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

Unified Diff: views/controls/button/custom_button.h

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/controls/button/custom_button.cc » ('j') | views/controls/menu/menu_controller.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/controls/button/custom_button.h
diff --git a/views/controls/button/custom_button.h b/views/controls/button/custom_button.h
index 9f2cb9fe8672648d4cbc964e21809d4711947269..5801401ab696a3c8c67dce7d9433ed8e7807c411 100644
--- a/views/controls/button/custom_button.h
+++ b/views/controls/button/custom_button.h
@@ -54,6 +54,13 @@ class CustomButton : public Button,
return triggerable_event_flags_;
}
+ // Sets whether |RequestFocus| should be invoked on a mouse press. The default
+ // is true.
+ void set_request_focus_on_press(bool value) {
+ request_focus_on_press_ = value;
+ }
+ bool request_focus_on_press() const { return request_focus_on_press_; }
+
protected:
// Construct the Button with a Listener. See comment for Button's ctor.
explicit CustomButton(ButtonListener* listener);
@@ -108,6 +115,9 @@ class CustomButton : public Button,
// Mouse event flags which can trigger button actions.
int triggerable_event_flags_;
+ // See description above setter.
+ bool request_focus_on_press_;
+
DISALLOW_COPY_AND_ASSIGN(CustomButton);
};
« no previous file with comments | « no previous file | views/controls/button/custom_button.cc » ('j') | views/controls/menu/menu_controller.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698