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

Unified Diff: ash/wm/workspace/workspace_event_handler.cc

Issue 2095193002: clang-format all of //ash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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;
}
« no previous file with comments | « ash/wm/workspace/multi_window_resize_controller_unittest.cc ('k') | ash/wm/workspace/workspace_event_handler_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698