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

Side by Side Diff: Source/web/ChromeClientImpl.cpp

Issue 348833005: [DO NOT COMMIT] Random hacks to unblock work on replication. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: More random hacks, including also dcheng's https://codereview.chromium.org/346403002 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « Source/modules/geolocation/GeolocationController.cpp ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
358 } 358 }
359 359
360 void ChromeClientImpl::setResizable(bool value) 360 void ChromeClientImpl::setResizable(bool value)
361 { 361 {
362 m_resizable = value; 362 m_resizable = value;
363 } 363 }
364 364
365 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url) 365 bool ChromeClientImpl::shouldReportDetailedMessageForSource(const String& url)
366 { 366 {
367 WebLocalFrameImpl* webframe = m_webView->mainFrameImpl(); 367 WebLocalFrameImpl* webframe = m_webView->mainFrameImpl();
368 return webframe->client() && webframe->client()->shouldReportDetailedMessage ForSource(url); 368 return webframe && webframe->client() && webframe->client()->shouldReportDet ailedMessageForSource(url);
369 } 369 }
370 370
371 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const S tring& sourceID, const String& stackTrace) 371 void ChromeClientImpl::addMessageToConsole(LocalFrame* localFrame, MessageSource source, MessageLevel level, const String& message, unsigned lineNumber, const S tring& sourceID, const String& stackTrace)
372 { 372 {
373 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame); 373 WebLocalFrameImpl* frame = WebLocalFrameImpl::fromFrame(localFrame);
374 if (frame && frame->client()) { 374 if (frame && frame->client()) {
375 frame->client()->didAddMessageToConsole( 375 frame->client()->didAddMessageToConsole(
376 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess age), 376 WebConsoleMessage(static_cast<WebConsoleMessage::Level>(level), mess age),
377 sourceID, 377 sourceID,
378 lineNumber, 378 lineNumber,
(...skipping 451 matching lines...) Expand 10 before | Expand all | Expand 10 after
830 if (!m_webView->autofillClient()) 830 if (!m_webView->autofillClient())
831 return; 831 return;
832 m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inp utElement), WebKeyboardEventBuilder(event)); 832 m_webView->autofillClient()->textFieldDidReceiveKeyDown(WebInputElement(&inp utElement), WebKeyboardEventBuilder(event));
833 } 833 }
834 834
835 // FIXME: Remove this code once we have input routing in the browser 835 // FIXME: Remove this code once we have input routing in the browser
836 // process. See http://crbug.com/339659. 836 // process. See http://crbug.com/339659.
837 void ChromeClientImpl::forwardInputEvent( 837 void ChromeClientImpl::forwardInputEvent(
838 WebCore::Frame* frame, WebCore::Event* event) 838 WebCore::Frame* frame, WebCore::Event* event)
839 { 839 {
840 // FIXME: Break input events for now, but don't crash.
841 if (frame->isRemoteFrame()) {
842 return;
843 }
840 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrameTempo rary(frame)); 844 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrameTempo rary(frame));
841 845
842 // This is only called when we have out-of-process iframes, which 846 // This is only called when we have out-of-process iframes, which
843 // need to forward input events across processes. 847 // need to forward input events across processes.
844 // FIXME: Add a check for out-of-process iframes enabled. 848 // FIXME: Add a check for out-of-process iframes enabled.
845 if (event->isKeyboardEvent()) { 849 if (event->isKeyboardEvent()) {
846 WebKeyboardEventBuilder webEvent(*static_cast<WebCore::KeyboardEvent*>(e vent)); 850 WebKeyboardEventBuilder webEvent(*static_cast<WebCore::KeyboardEvent*>(e vent));
847 webFrame->client()->forwardInputEvent(&webEvent); 851 webFrame->client()->forwardInputEvent(&webEvent);
848 } else if (event->isMouseEvent()) { 852 } else if (event->isMouseEvent()) {
849 WebMouseEventBuilder webEvent(webFrame->frameView(), frame->ownerRendere r(), *static_cast<WebCore::MouseEvent*>(event)); 853 WebMouseEventBuilder webEvent(webFrame->frameView(), frame->ownerRendere r(), *static_cast<WebCore::MouseEvent*>(event));
(...skipping 23 matching lines...) Expand all
873 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp utElement)); 877 m_webView->autofillClient()->textFieldDidEndEditing(WebInputElement(&inp utElement));
874 } 878 }
875 879
876 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input) 880 void ChromeClientImpl::openTextDataListChooser(HTMLInputElement& input)
877 { 881 {
878 if (m_webView->autofillClient()) 882 if (m_webView->autofillClient())
879 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in put)); 883 m_webView->autofillClient()->openTextDataListChooser(WebInputElement(&in put));
880 } 884 }
881 885
882 } // namespace blink 886 } // namespace blink
OLDNEW
« no previous file with comments | « Source/modules/geolocation/GeolocationController.cpp ('k') | Source/web/WebFrame.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698