| 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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (WebInputEvent::isGestureEventType(inputEvent.type)) { | 332 if (WebInputEvent::isGestureEventType(inputEvent.type)) { |
| 333 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(input
Event); | 333 const WebGestureEvent& event = static_cast<const WebGestureEvent&>(input
Event); |
| 334 return m_page->mainFrame()->newEventHandler().handleGestureEvent(event); | 334 return m_page->mainFrame()->newEventHandler().handleGestureEvent(event); |
| 335 } | 335 } |
| 336 | 336 |
| 337 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { | 337 if (WebInputEvent::isKeyboardEventType(inputEvent.type)) { |
| 338 const WebKeyboardEvent& event = static_cast<const WebKeyboardEvent&>(inp
utEvent); | 338 const WebKeyboardEvent& event = static_cast<const WebKeyboardEvent&>(inp
utEvent); |
| 339 return m_page->mainFrame()->newEventHandler().handleKeyboardEvent(event)
; | 339 return m_page->mainFrame()->newEventHandler().handleKeyboardEvent(event)
; |
| 340 } | 340 } |
| 341 | 341 |
| 342 if (WebInputEvent::isWheelEventType(inputEvent.type)) { |
| 343 const WebWheelEvent& event = static_cast<const WebWheelEvent&>(inputEven
t); |
| 344 return m_page->mainFrame()->newEventHandler().handleWheelEvent(event); |
| 345 } |
| 346 |
| 342 return false; | 347 return false; |
| 343 } | 348 } |
| 344 | 349 |
| 345 void WebViewImpl::setFocus(bool enable) | 350 void WebViewImpl::setFocus(bool enable) |
| 346 { | 351 { |
| 347 m_page->focusController().setFocused(enable); | 352 m_page->focusController().setFocused(enable); |
| 348 if (enable) { | 353 if (enable) { |
| 349 m_page->focusController().setActive(true); | 354 m_page->focusController().setActive(true); |
| 350 RefPtr<LocalFrame> focusedFrame = m_page->focusController().focusedFrame
(); | 355 RefPtr<LocalFrame> focusedFrame = m_page->focusController().focusedFrame
(); |
| 351 if (focusedFrame) { | 356 if (focusedFrame) { |
| (...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 855 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, | 860 void WebViewImpl::setVisibilityState(WebPageVisibilityState visibilityState, |
| 856 bool isInitialState) { | 861 bool isInitialState) { |
| 857 if (!page()) | 862 if (!page()) |
| 858 return; | 863 return; |
| 859 | 864 |
| 860 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); | 865 ASSERT(visibilityState == WebPageVisibilityStateVisible || visibilityState =
= WebPageVisibilityStateHidden); |
| 861 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); | 866 m_page->setVisibilityState(static_cast<PageVisibilityState>(static_cast<int>
(visibilityState)), isInitialState); |
| 862 } | 867 } |
| 863 | 868 |
| 864 } // namespace blink | 869 } // namespace blink |
| OLD | NEW |