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

Side by Side Diff: sky/engine/web/ChromeClientImpl.cpp

Issue 872233002: Switch KeyboardEvents over to NewEventHandler (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Rename virtualKeyCode to key Created 5 years, 11 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
« no previous file with comments | « sky/engine/web/ChromeClientImpl.h ('k') | sky/engine/web/WebInputEventConversion.h » ('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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #include "sky/engine/public/platform/WebRect.h" 54 #include "sky/engine/public/platform/WebRect.h"
55 #include "sky/engine/public/platform/WebURLRequest.h" 55 #include "sky/engine/public/platform/WebURLRequest.h"
56 #include "sky/engine/public/web/Sky.h" 56 #include "sky/engine/public/web/Sky.h"
57 #include "sky/engine/public/web/WebConsoleMessage.h" 57 #include "sky/engine/public/web/WebConsoleMessage.h"
58 #include "sky/engine/public/web/WebFrameClient.h" 58 #include "sky/engine/public/web/WebFrameClient.h"
59 #include "sky/engine/public/web/WebNode.h" 59 #include "sky/engine/public/web/WebNode.h"
60 #include "sky/engine/public/web/WebSettings.h" 60 #include "sky/engine/public/web/WebSettings.h"
61 #include "sky/engine/public/web/WebTextDirection.h" 61 #include "sky/engine/public/web/WebTextDirection.h"
62 #include "sky/engine/public/web/WebTouchAction.h" 62 #include "sky/engine/public/web/WebTouchAction.h"
63 #include "sky/engine/public/web/WebViewClient.h" 63 #include "sky/engine/public/web/WebViewClient.h"
64 #include "sky/engine/web/WebInputEventConversion.h"
65 #include "sky/engine/web/WebLocalFrameImpl.h" 64 #include "sky/engine/web/WebLocalFrameImpl.h"
66 #include "sky/engine/web/WebSettingsImpl.h" 65 #include "sky/engine/web/WebSettingsImpl.h"
67 #include "sky/engine/web/WebViewImpl.h" 66 #include "sky/engine/web/WebViewImpl.h"
68 #include "sky/engine/wtf/text/CString.h" 67 #include "sky/engine/wtf/text/CString.h"
69 #include "sky/engine/wtf/text/StringBuilder.h" 68 #include "sky/engine/wtf/text/StringBuilder.h"
70 #include "sky/engine/wtf/text/StringConcatenate.h" 69 #include "sky/engine/wtf/text/StringConcatenate.h"
71 #include "sky/engine/wtf/unicode/CharacterNames.h" 70 #include "sky/engine/wtf/unicode/CharacterNames.h"
72 71
73 namespace blink { 72 namespace blink {
74 73
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 if (m_webView->client()) 280 if (m_webView->client())
282 m_webView->client()->didUpdateTextOfFocusedElementByNonUserInput(); 281 m_webView->client()->didUpdateTextOfFocusedElementByNonUserInput();
283 } 282 }
284 283
285 void ChromeClientImpl::showImeIfNeeded() 284 void ChromeClientImpl::showImeIfNeeded()
286 { 285 {
287 if (m_webView->client()) 286 if (m_webView->client())
288 m_webView->client()->showImeIfNeeded(); 287 m_webView->client()->showImeIfNeeded();
289 } 288 }
290 289
291 // FIXME: Remove this code once we have input routing in the browser
292 // process. See http://crbug.com/339659.
293 void ChromeClientImpl::forwardInputEvent(
294 Frame* frame, Event* event)
295 {
296 WebLocalFrameImpl* webFrame = WebLocalFrameImpl::fromFrame(toLocalFrame(fram e));
297
298 // This is only called when we have out-of-process iframes, which
299 // need to forward input events across processes.
300 // FIXME: Add a check for out-of-process iframes enabled.
301 if (event->isKeyboardEvent()) {
302 WebKeyboardEventBuilder webEvent(*static_cast<KeyboardEvent*>(event));
303 webFrame->client()->forwardInputEvent(&webEvent);
304 }
305 }
306
307 } // namespace blink 290 } // namespace blink
OLDNEW
« no previous file with comments | « sky/engine/web/ChromeClientImpl.h ('k') | sky/engine/web/WebInputEventConversion.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698