| Index: ash/wm/workspace/workspace_event_handler.cc
|
| diff --git a/ash/wm/workspace/workspace_event_handler.cc b/ash/wm/workspace/workspace_event_handler.cc
|
| index 51a796fca272a80577780dd40f67cd54eb3923d5..33d33022d8054e36376530d1a5b96e1cb3503ddc 100644
|
| --- a/ash/wm/workspace/workspace_event_handler.cc
|
| +++ b/ash/wm/workspace/workspace_event_handler.cc
|
| @@ -17,21 +17,17 @@
|
|
|
| namespace ash {
|
|
|
| -WorkspaceEventHandler::WorkspaceEventHandler()
|
| - : click_component_(HTNOWHERE) {
|
| -}
|
| +WorkspaceEventHandler::WorkspaceEventHandler() : click_component_(HTNOWHERE) {}
|
|
|
| -WorkspaceEventHandler::~WorkspaceEventHandler() {
|
| -}
|
| +WorkspaceEventHandler::~WorkspaceEventHandler() {}
|
|
|
| void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
|
| aura::Window* target = static_cast<aura::Window*>(event->target());
|
| - if (event->type() == ui::ET_MOUSE_PRESSED &&
|
| - event->IsOnlyLeftMouseButton() &&
|
| - ((event->flags() &
|
| - (ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) == 0)) {
|
| - click_component_ = target->delegate()->
|
| - GetNonClientComponent(event->location());
|
| + if (event->type() == ui::ET_MOUSE_PRESSED && event->IsOnlyLeftMouseButton() &&
|
| + ((event->flags() & (ui::EF_IS_DOUBLE_CLICK | ui::EF_IS_TRIPLE_CLICK)) ==
|
| + 0)) {
|
| + click_component_ =
|
| + target->delegate()->GetNonClientComponent(event->location());
|
| }
|
|
|
| if (event->handled())
|
| @@ -55,10 +51,9 @@ void WorkspaceEventHandler::OnMouseEvent(ui::MouseEvent* event) {
|
|
|
| if (event->IsOnlyLeftMouseButton()) {
|
| if (event->flags() & ui::EF_IS_DOUBLE_CLICK) {
|
| - int component = target->delegate()->
|
| - GetNonClientComponent(event->location());
|
| - if (component == HTCAPTION &&
|
| - component == click_component_) {
|
| + int component =
|
| + target->delegate()->GetNonClientComponent(event->location());
|
| + if (component == HTCAPTION && component == click_component_) {
|
| WmShell::Get()->RecordUserMetricsAction(
|
| UMA_TOGGLE_MAXIMIZE_CAPTION_CLICK);
|
| const wm::WMEvent wm_event(wm::WM_EVENT_TOGGLE_MAXIMIZE_CAPTION);
|
| @@ -85,15 +80,15 @@ void WorkspaceEventHandler::OnGestureEvent(ui::GestureEvent* event) {
|
|
|
| aura::Window* target = static_cast<aura::Window*>(event->target());
|
| int previous_target_component = click_component_;
|
| - click_component_ = target->delegate()->
|
| - GetNonClientComponent(event->location());
|
| + click_component_ =
|
| + target->delegate()->GetNonClientComponent(event->location());
|
|
|
| if (click_component_ != HTCAPTION)
|
| return;
|
|
|
| if (event->details().tap_count() != 2) {
|
| - TouchUMA::GetInstance()->
|
| - RecordGestureAction(TouchUMA::GESTURE_FRAMEVIEW_TAP);
|
| + TouchUMA::GetInstance()->RecordGestureAction(
|
| + TouchUMA::GESTURE_FRAMEVIEW_TAP);
|
| return;
|
| }
|
|
|
|
|