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

Side by Side Diff: components/test_runner/event_sender.cc

Issue 1210013007: clang/win: Fix warnings to prepare for building without -Wno-reorder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clang-unsequenced
Patch Set: Created 5 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/test_runner/event_sender.h" 5 #include "components/test_runner/event_sender.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/stringprintf.h" 10 #include "base/strings/stringprintf.h"
(...skipping 1061 matching lines...) Expand 10 before | Expand all | Expand 10 after
1072 WebMouseEvent::Button EventSender::last_button_type_ = 1072 WebMouseEvent::Button EventSender::last_button_type_ =
1073 WebMouseEvent::ButtonNone; 1073 WebMouseEvent::ButtonNone;
1074 1074
1075 EventSender::SavedEvent::SavedEvent() 1075 EventSender::SavedEvent::SavedEvent()
1076 : type(TYPE_UNSPECIFIED), 1076 : type(TYPE_UNSPECIFIED),
1077 button_type(WebMouseEvent::ButtonNone), 1077 button_type(WebMouseEvent::ButtonNone),
1078 milliseconds(0), 1078 milliseconds(0),
1079 modifiers(0) {} 1079 modifiers(0) {}
1080 1080
1081 EventSender::EventSender(TestInterfaces* interfaces) 1081 EventSender::EventSender(TestInterfaces* interfaces)
1082 : interfaces_(interfaces), 1082 :
1083 #if defined(OS_WIN)
1084 wm_key_down_(0),
1085 wm_key_up_(0),
1086 wm_char_(0),
1087 wm_dead_char_(0),
1088 wm_sys_key_down_(0),
1089 wm_sys_key_up_(0),
1090 wm_sys_char_(0),
1091 wm_sys_dead_char_(0),
1092 #endif
1093 interfaces_(interfaces),
1083 delegate_(NULL), 1094 delegate_(NULL),
1084 view_(NULL), 1095 view_(NULL),
1085 force_layout_on_events_(false), 1096 force_layout_on_events_(false),
1086 is_drag_mode_(true), 1097 is_drag_mode_(true),
1087 touch_modifiers_(0), 1098 touch_modifiers_(0),
1088 touch_cancelable_(true), 1099 touch_cancelable_(true),
1089 replaying_saved_events_(false), 1100 replaying_saved_events_(false),
1090 current_drag_effects_allowed_(blink::WebDragOperationNone), 1101 current_drag_effects_allowed_(blink::WebDragOperationNone),
1091 last_click_time_sec_(0), 1102 last_click_time_sec_(0),
1092 current_drag_effect_(blink::WebDragOperationNone), 1103 current_drag_effect_(blink::WebDragOperationNone),
1093 time_offset_ms_(0), 1104 time_offset_ms_(0),
1094 click_count_(0), 1105 click_count_(0),
1095 #if defined(OS_WIN) 1106 weak_factory_(this) {
1096 wm_key_down_(0), 1107 }
1097 wm_key_up_(0),
1098 wm_char_(0),
1099 wm_dead_char_(0),
1100 wm_sys_key_down_(0),
1101 wm_sys_key_up_(0),
1102 wm_sys_char_(0),
1103 wm_sys_dead_char_(0),
1104 #endif
1105 weak_factory_(this) {}
1106 1108
1107 EventSender::~EventSender() {} 1109 EventSender::~EventSender() {}
1108 1110
1109 void EventSender::Reset() { 1111 void EventSender::Reset() {
1110 DCHECK(current_drag_data_.isNull()); 1112 DCHECK(current_drag_data_.isNull());
1111 current_drag_data_.reset(); 1113 current_drag_data_.reset();
1112 current_drag_effect_ = blink::WebDragOperationNone; 1114 current_drag_effect_ = blink::WebDragOperationNone;
1113 current_drag_effects_allowed_ = blink::WebDragOperationNone; 1115 current_drag_effects_allowed_ = blink::WebDragOperationNone;
1114 if (view_ && pressed_button_ != WebMouseEvent::ButtonNone) 1116 if (view_ && pressed_button_ != WebMouseEvent::ButtonNone)
1115 view_->mouseCaptureLost(); 1117 view_->mouseCaptureLost();
(...skipping 1358 matching lines...) Expand 10 before | Expand all | Expand 10 after
2474 2476
2475 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) { 2477 bool EventSender::HandleInputEventOnViewOrPopup(const WebInputEvent& event) {
2476 if (WebPagePopup* popup = view_->pagePopup()) { 2478 if (WebPagePopup* popup = view_->pagePopup()) {
2477 if (!WebInputEvent::isKeyboardEventType(event.type)) 2479 if (!WebInputEvent::isKeyboardEventType(event.type))
2478 return popup->handleInputEvent(event); 2480 return popup->handleInputEvent(event);
2479 } 2481 }
2480 return view_->handleInputEvent(event); 2482 return view_->handleInputEvent(event);
2481 } 2483 }
2482 2484
2483 } // namespace test_runner 2485 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698