OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
174 // PageWidgetEventHandler functions | 174 // PageWidgetEventHandler functions |
175 void HandleMouseLeave(LocalFrame&, const WebMouseEvent&) override; | 175 void HandleMouseLeave(LocalFrame&, const WebMouseEvent&) override; |
176 void HandleMouseDown(LocalFrame&, const WebMouseEvent&) override; | 176 void HandleMouseDown(LocalFrame&, const WebMouseEvent&) override; |
177 void HandleMouseUp(LocalFrame&, const WebMouseEvent&) override; | 177 void HandleMouseUp(LocalFrame&, const WebMouseEvent&) override; |
178 WebInputEventResult HandleMouseWheel(LocalFrame&, | 178 WebInputEventResult HandleMouseWheel(LocalFrame&, |
179 const WebMouseWheelEvent&) override; | 179 const WebMouseWheelEvent&) override; |
180 WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override; | 180 WebInputEventResult HandleGestureEvent(const WebGestureEvent&) override; |
181 WebInputEventResult HandleKeyEvent(const WebKeyboardEvent&) override; | 181 WebInputEventResult HandleKeyEvent(const WebKeyboardEvent&) override; |
182 WebInputEventResult HandleCharEvent(const WebKeyboardEvent&) override; | 182 WebInputEventResult HandleCharEvent(const WebKeyboardEvent&) override; |
183 | 183 |
184 // This method returns the focused frame belonging to this WebWidget, that | |
185 // is, a focused frame with the same local root as the one corresponding | |
186 // to this widget. It will return nullptr if no frame is focused or, the | |
187 // focused frame has a different local root. | |
188 LocalFrame* FocusedLocalFrameInWidget() const; | |
189 | |
190 LocalFrame* FocusedLocalFrameAvailableForIme() const; | |
191 | |
192 CompositorMutatorImpl& Mutator(); | 184 CompositorMutatorImpl& Mutator(); |
193 | 185 |
194 WebWidgetClient* client_; | 186 WebWidgetClient* client_; |
195 | 187 |
196 // WebFrameWidget is associated with a subtree of the frame tree, | 188 // WebFrameWidget is associated with a subtree of the frame tree, |
197 // corresponding to a maximal connected tree of LocalFrames. This member | 189 // corresponding to a maximal connected tree of LocalFrames. This member |
198 // points to the root of that subtree. | 190 // points to the root of that subtree. |
199 Member<WebLocalFrameBase> local_root_; | 191 Member<WebLocalFrameBase> local_root_; |
200 | 192 |
201 WebSize size_; | 193 WebSize size_; |
(...skipping 14 matching lines...) Expand all Loading... |
216 bool is_accelerated_compositing_active_; | 208 bool is_accelerated_compositing_active_; |
217 bool layer_tree_view_closed_; | 209 bool layer_tree_view_closed_; |
218 | 210 |
219 bool suppress_next_keypress_event_; | 211 bool suppress_next_keypress_event_; |
220 | 212 |
221 bool background_color_override_enabled_; | 213 bool background_color_override_enabled_; |
222 WebColor background_color_override_; | 214 WebColor background_color_override_; |
223 bool base_background_color_override_enabled_; | 215 bool base_background_color_override_enabled_; |
224 WebColor base_background_color_override_; | 216 WebColor base_background_color_override_; |
225 | 217 |
226 // TODO(ekaramad): Can we remove this and make sure IME events are not called | |
227 // when there is no page focus? | |
228 // Represents whether or not this object should process incoming IME events. | |
229 bool ime_accept_events_; | |
230 | |
231 static const WebInputEvent* current_input_event_; | 218 static const WebInputEvent* current_input_event_; |
232 | 219 |
233 WebColor base_background_color_; | 220 WebColor base_background_color_; |
234 | 221 |
235 SelfKeepAlive<WebFrameWidgetImpl> self_keep_alive_; | 222 SelfKeepAlive<WebFrameWidgetImpl> self_keep_alive_; |
236 }; | 223 }; |
237 | 224 |
238 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, | 225 DEFINE_TYPE_CASTS(WebFrameWidgetImpl, |
239 WebFrameWidgetBase, | 226 WebFrameWidgetBase, |
240 widget, | 227 widget, |
241 widget->ForSubframe(), | 228 widget->ForSubframe(), |
242 widget.ForSubframe()); | 229 widget.ForSubframe()); |
243 | 230 |
244 } // namespace blink | 231 } // namespace blink |
245 | 232 |
246 #endif | 233 #endif |
OLD | NEW |