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

Unified Diff: chrome/browser/cocoa/clickhold_button_cell.h

Issue 179043: (Mac) Added unit tests for ClickHoldButtonCell and DelayedMenuButton. (Closed)
Patch Set: Read gtest docs; using constructors instead of SetUp() is okay. Created 11 years, 4 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 | chrome/browser/cocoa/clickhold_button_cell.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/cocoa/clickhold_button_cell.h
diff --git a/chrome/browser/cocoa/clickhold_button_cell.h b/chrome/browser/cocoa/clickhold_button_cell.h
index 28dde69c049aff48c28aa361c95bff333fd22090..483336ec2d2e9958d503731694af354cb7da9c1c 100644
--- a/chrome/browser/cocoa/clickhold_button_cell.h
+++ b/chrome/browser/cocoa/clickhold_button_cell.h
@@ -10,10 +10,9 @@
#include "base/scoped_nsobject.h"
#import "chrome/browser/cocoa/gradient_button_cell.h"
-// A button cell that implements "click hold" behavior after a specified
-// delay. If -setClickHoldTimeout: is never called, this behaves like a normal
-// button.
-
+// A button cell that implements "click hold" behavior after a specified delay
+// or after dragging. If click-hold is never enabled (e.g., if
+// |-setEnableClickHold:| is never called), this behaves like a normal button.
@interface ClickHoldButtonCell : GradientButtonCell {
@private
BOOL enableClickHold_;
@@ -24,16 +23,18 @@
BOOL activateOnDrag_;
}
-// Enable click-hold?
+// Enable click-hold? Default: NO.
@property(assign, nonatomic) BOOL enableClickHold;
-// Timeout is in seconds (at least 0.01, at most 3600).
+// Timeout is in seconds (at least 0.01, at most 3600). Default: 0.25 (a guess
+// at a Cocoa-ish value).
@property(assign, nonatomic) NSTimeInterval clickHoldTimeout;
-// Track only in the frame rectangle?
+// Track only in the frame rectangle? Default: NO.
@property(assign, nonatomic) BOOL trackOnlyInRect;
-// Activate (click-hold) immediately on drag?
+// Activate (click-hold) immediately on a sufficiently-large drag (if not,
+// always wait for timeout)? Default: YES.
@property(assign, nonatomic) BOOL activateOnDrag;
// Defines what to do when click-held (as per usual action/target).
« no previous file with comments | « no previous file | chrome/browser/cocoa/clickhold_button_cell.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698