OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Google Inc. All rights reserved. | 2 * Copyright (C) 2009 Google Inc. All rights reserved. |
3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | 3 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
358 return m_menubarVisible; | 358 return m_menubarVisible; |
359 } | 359 } |
360 | 360 |
361 void ChromeClientImpl::setResizable(bool value) | 361 void ChromeClientImpl::setResizable(bool value) |
362 { | 362 { |
363 m_resizable = value; | 363 m_resizable = value; |
364 } | 364 } |
365 | 365 |
366 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url) | 366 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url) |
367 { | 367 { |
368 WebLocalFrameImpl* webframe = m_webView->mainFrameImpl(); | 368 WebLocalFrameImpl* webframe = m_webView->localFrameRootTemporary(); |
369 return webframe->client() && webframe->client()->shouldReportDetailedMessage
ForSource(url); | 369 return webframe->client() && webframe->client()->shouldReportDetailedMessage
ForSource(url); |
370 } | 370 } |
371 | 371 |
372 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource
source, MessageLevel level, const String& message, unsigned lineNumber, const S
tring& sourceID, const String& stackTrace) | 372 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource
source, MessageLevel level, const String& message, unsigned lineNumber, const S
tring& sourceID, const String& stackTrace) |
373 { | 373 { |
374 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame); | 374 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame); |
375 if (frame && frame->client()) { | 375 if (frame && frame->client()) { |
376 frame->client()->didAddMessageToConsole( | 376 frame->client()->didAddMessageToConsole( |
377 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess
age), | 377 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess
age), |
378 sourceID, | 378 sourceID, |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 if (!m_webView->autofillClient()) | 835 if (!m_webView->autofillClient()) |
836 return; | 836 return; |
837 m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inp
utElement), WebKeyboardEventBuilder(event)); | 837 m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inp
utElement), WebKeyboardEventBuilder(event)); |
838 } | 838 } |
839 | 839 |
840 // FIXME: Remove this code once we have input routing in the browser | 840 // FIXME: Remove this code once we have input routing in the browser |
841 // process. See http://crbug.com/339659. | 841 // process. See http://crbug.com/339659. |
842 void ChromeClientImpl::forwardInputEvent( | 842 void ChromeClientImpl::forwardInputEvent( |
843 WebCore::Frame* frame, WebCore::Event* event) | 843 WebCore::Frame* frame, WebCore::Event* event) |
844 { | 844 { |
845 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrameTempo
rary(frame)); | 845 // FIXME: Input event forwarding to out-of-process frames is broken until |
| 846 // WebRemoteFrameImpl has a WebFrameClient. |
| 847 if (frame->isRemoteFrame()) |
| 848 return; |
| 849 |
| 850 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(fram
e)); |
846 | 851 |
847 // This is only called when we have out-of-process iframes, which | 852 // This is only called when we have out-of-process iframes, which |
848 // need to forward input events across processes. | 853 // need to forward input events across processes. |
849 // FIXME: Add a check for out-of-process iframes enabled. | 854 // FIXME: Add a check for out-of-process iframes enabled. |
850 if (event->isKeyboardEvent()) { | 855 if (event->isKeyboardEvent()) { |
851 WebKeyboardEventBuilder webEvent(*static_cast<WebCore::KeyboardEvent*>(e
vent)); | 856 WebKeyboardEventBuilder webEvent(*static_cast<WebCore::KeyboardEvent*>(e
vent)); |
852 webFrame->client()->forwardInputEvent(&webEvent); | 857 webFrame->client()->forwardInputEvent(&webEvent); |
853 } else if (event->isMouseEvent()) { | 858 } else if (event->isMouseEvent()) { |
854 WebMouseEventBuilder webEvent(webFrame->frameView(), frame->ownerRendere
r(), *static_cast<WebCore::MouseEvent*>(event)); | 859 WebMouseEventBuilder webEvent(webFrame->frameView(), frame->ownerRendere
r(), *static_cast<WebCore::MouseEvent*>(event)); |
855 // Internal Blink events should not be forwarded. | 860 // Internal Blink events should not be forwarded. |
(...skipping 22 matching lines...) Expand all Loading... |
878 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp
utElement)); | 883 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp
utElement)); |
879 } | 884 } |
880 | 885 |
881 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) | 886 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) |
882 { | 887 { |
883 if (m_webView->autofillClient()) | 888 if (m_webView->autofillClient()) |
884 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in
put)); | 889 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in
put)); |
885 } | 890 } |
886 | 891 |
887 } // namespace blink | 892 } // namespace blink |
OLD | NEW |