| Index: chrome/browser/ui/panels/panel_browser_view.cc
|
| diff --git a/chrome/browser/ui/panels/panel_browser_view.cc b/chrome/browser/ui/panels/panel_browser_view.cc
|
| index 0a887e2e5106c468c3f6da82f4a9c8dd84b48ee0..6ab12d83f757111134de215a7883c1c7fd54abd9 100644
|
| --- a/chrome/browser/ui/panels/panel_browser_view.cc
|
| +++ b/chrome/browser/ui/panels/panel_browser_view.cc
|
| @@ -25,13 +25,11 @@ namespace {
|
| const int kSetBoundsAnimationMs = 180;
|
|
|
| // The threshold to differentiate the short click and long click.
|
| -const base::TimeDelta kShortClickThresholdMs =
|
| - base::TimeDelta::FromMilliseconds(200);
|
| +const int kShortClickThresholdMs = 200;
|
|
|
| // Delay before click-to-minimize is allowed after the attention has been
|
| // cleared.
|
| -const base::TimeDelta kSuspendMinimizeOnClickIntervalMs =
|
| - base::TimeDelta::FromMilliseconds(500);
|
| +const int kSuspendMinimizeOnClickIntervalMs = 500;
|
|
|
| }
|
|
|
| @@ -441,13 +439,14 @@ bool PanelBrowserView::OnTitlebarMouseReleased() {
|
| // a hack to prevent the panel from being minimized when the user clicks on
|
| // the title-bar to clear the attention.
|
| if (panel_->expansion_state() == Panel::EXPANDED &&
|
| - base::TimeTicks::Now() < attention_cleared_time_ +
|
| - kSuspendMinimizeOnClickIntervalMs) {
|
| + base::TimeTicks::Now() - attention_cleared_time_ <
|
| + base::TimeDelta::FromMilliseconds(kSuspendMinimizeOnClickIntervalMs)) {
|
| return true;
|
| }
|
|
|
| // Do not minimize the panel if it is long click.
|
| - if (base::TimeTicks::Now() - mouse_pressed_time_ > kShortClickThresholdMs)
|
| + if (base::TimeTicks::Now() - mouse_pressed_time_ >
|
| + base::TimeDelta::FromMilliseconds(kShortClickThresholdMs))
|
| return true;
|
|
|
| Panel::ExpansionState new_expansion_state =
|
|
|