OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2011, 2012 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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
304 return EventTypeNames::gesturetap; | 304 return EventTypeNames::gesturetap; |
305 case WebInputEvent::GestureTapUnconfirmed: | 305 case WebInputEvent::GestureTapUnconfirmed: |
306 return EventTypeNames::gesturetapunconfirmed; | 306 return EventTypeNames::gesturetapunconfirmed; |
307 default: | 307 default: |
308 return String("unknown"); | 308 return String("unknown"); |
309 } | 309 } |
310 } | 310 } |
311 | 311 |
312 bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) | 312 bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent) |
313 { | 313 { |
314 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", inputTypeToNa
me(inputEvent.type).ascii().data()); | 314 TRACE_EVENT1("input", "WebViewImpl::handleInputEvent", "type", |
| 315 TRACE_STR_COPY(inputTypeToName(inputEvent.type).ascii().data())
); |
315 | 316 |
316 if (WebInputEvent::isPointerEventType(inputEvent.type)) { | 317 if (WebInputEvent::isPointerEventType(inputEvent.type)) { |
317 const WebPointerEvent& event = static_cast<const WebPointerEvent&>(input
Event); | 318 const WebPointerEvent& event = static_cast<const WebPointerEvent&>(input
Event); |
318 return m_page->mainFrame()->newEventHandler().handlePointerEvent(event); | 319 return m_page->mainFrame()->newEventHandler().handlePointerEvent(event); |
319 } | 320 } |
320 | 321 |
321 if (WebInputEvent::isGestureEventType(inputEvent.type)) { | 322 if (WebInputEvent::isGestureEventType(inputEvent.type)) { |
322 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(input
Event); | 323 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(input
Event); |
323 return m_page->mainFrame()->newEventHandler().handleGestureEvent(event); | 324 return m_page->mainFrame()->newEventHandler().handleGestureEvent(event); |
324 } | 325 } |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
804 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 805 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
805 bool isInitialState) { | 806 bool isInitialState) { |
806 if (!page()) | 807 if (!page()) |
807 return; | 808 return; |
808 | 809 |
809 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); | 810 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); |
810 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 811 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
811 } | 812 } |
812 | 813 |
813 } // namespace blink | 814 } // namespace blink |
OLD | NEW |