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

Side by Side Diff: third_party/WebKit/Source/web/WebLocalFrameImpl.cpp

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Moved ConfirmCompositionBehavior to WebInputMethodController Created 4 years, 3 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 #include "public/web/WebConsoleMessage.h" 189 #include "public/web/WebConsoleMessage.h"
190 #include "public/web/WebDOMEvent.h" 190 #include "public/web/WebDOMEvent.h"
191 #include "public/web/WebDocument.h" 191 #include "public/web/WebDocument.h"
192 #include "public/web/WebFindOptions.h" 192 #include "public/web/WebFindOptions.h"
193 #include "public/web/WebFormElement.h" 193 #include "public/web/WebFormElement.h"
194 #include "public/web/WebFrameClient.h" 194 #include "public/web/WebFrameClient.h"
195 #include "public/web/WebFrameOwnerProperties.h" 195 #include "public/web/WebFrameOwnerProperties.h"
196 #include "public/web/WebHistoryItem.h" 196 #include "public/web/WebHistoryItem.h"
197 #include "public/web/WebIconURL.h" 197 #include "public/web/WebIconURL.h"
198 #include "public/web/WebInputElement.h" 198 #include "public/web/WebInputElement.h"
199 #include "public/web/WebInputMethodController.h"
199 #include "public/web/WebKit.h" 200 #include "public/web/WebKit.h"
200 #include "public/web/WebNode.h" 201 #include "public/web/WebNode.h"
201 #include "public/web/WebPerformance.h" 202 #include "public/web/WebPerformance.h"
202 #include "public/web/WebPlugin.h" 203 #include "public/web/WebPlugin.h"
203 #include "public/web/WebPrintParams.h" 204 #include "public/web/WebPrintParams.h"
204 #include "public/web/WebPrintPresetOptions.h" 205 #include "public/web/WebPrintPresetOptions.h"
205 #include "public/web/WebRange.h" 206 #include "public/web/WebRange.h"
206 #include "public/web/WebScriptSource.h" 207 #include "public/web/WebScriptSource.h"
207 #include "public/web/WebSerializedScriptValue.h" 208 #include "public/web/WebSerializedScriptValue.h"
208 #include "public/web/WebTreeScopeType.h" 209 #include "public/web/WebTreeScopeType.h"
(...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after
1242 1243
1243 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 1244 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
1244 // needs to be audited. See http://crbug.com/590369 for more details. 1245 // needs to be audited. See http://crbug.com/590369 for more details.
1245 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 1246 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
1246 1247
1247 inputMethodController.setCompositionFromExistingText(CompositionUnderlineVec torBuilder(underlines), compositionStart, compositionEnd); 1248 inputMethodController.setCompositionFromExistingText(CompositionUnderlineVec torBuilder(underlines), compositionStart, compositionEnd);
1248 1249
1249 return true; 1250 return true;
1250 } 1251 }
1251 1252
1252 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after) 1253 void WebLocalFrameImpl::extendSelectionAndDelete(int before, int after)
Changwan Ryu 2016/09/19 02:08:36 Hmm... Sorry for my ignorance, but how are we plum
EhsanK 2016/09/20 15:38:29 Very good point! I had not considered those method
Changwan Ryu 2016/09/21 08:42:03 Hmm... Thanks for adding them. (I noticed that onl
EhsanK 2016/09/21 16:49:10 Sorry for the public vs private versions of the do
Changwan Ryu 2016/09/21 23:33:16 I see. Thanks for the clarification!
1253 { 1254 {
1254 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete"); 1255 TRACE_EVENT0("blink", "WebLocalFrameImpl::extendSelectionAndDelete");
1255 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) { 1256 if (WebPlugin* plugin = focusedPluginIfInputMethodSupported()) {
1256 plugin->extendSelectionAndDelete(before, after); 1257 plugin->extendSelectionAndDelete(before, after);
1257 return; 1258 return;
1258 } 1259 }
1259 1260
1260 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets 1261 // TODO(xiaochengh): The use of updateStyleAndLayoutIgnorePendingStylesheets
1261 // needs to be audited. See http://crbug.com/590369 for more details. 1262 // needs to be audited. See http://crbug.com/590369 for more details.
1262 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets(); 1263 frame()->document()->updateStyleAndLayoutIgnorePendingStylesheets();
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 1460
1460 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent) 1461 WebLocalFrameImpl::WebLocalFrameImpl(WebTreeScopeType scope, WebFrameClient* cli ent)
1461 : WebLocalFrame(scope) 1462 : WebLocalFrame(scope)
1462 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this)) 1463 , m_frameLoaderClientImpl(FrameLoaderClientImpl::create(this))
1463 , m_frameWidget(0) 1464 , m_frameWidget(0)
1464 , m_client(client) 1465 , m_client(client)
1465 , m_autofillClient(0) 1466 , m_autofillClient(0)
1466 , m_contentSettingsClient(0) 1467 , m_contentSettingsClient(0)
1467 , m_inputEventsScaleFactorForEmulation(1) 1468 , m_inputEventsScaleFactorForEmulation(1)
1468 , m_webDevToolsFrontend(0) 1469 , m_webDevToolsFrontend(0)
1470 , m_inputMethodController(new WebInputMethodControllerImpl(this))
1469 , m_selfKeepAlive(this) 1471 , m_selfKeepAlive(this)
1470 { 1472 {
1471 frameCount++; 1473 frameCount++;
1472 } 1474 }
1473 1475
1474 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient * client) 1476 WebLocalFrameImpl::WebLocalFrameImpl(WebRemoteFrame* oldWebFrame, WebFrameClient * client)
1475 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client) 1477 : WebLocalFrameImpl(oldWebFrame->inShadowTree() ? WebTreeScopeType::Shadow : WebTreeScopeType::Document, client)
1476 { 1478 {
1477 } 1479 }
1478 1480
(...skipping 755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 } else if (metric == "npnNegotiatedProtocol") { 2236 } else if (metric == "npnNegotiatedProtocol") {
2235 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; 2237 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol;
2236 } else if (metric == "wasAlternateProtocolAvailable") { 2238 } else if (metric == "wasAlternateProtocolAvailable") {
2237 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; 2239 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable;
2238 } else if (metric == "connectionInfo") { 2240 } else if (metric == "connectionInfo") {
2239 feature = UseCounter::ChromeLoadTimesConnectionInfo; 2241 feature = UseCounter::ChromeLoadTimesConnectionInfo;
2240 } 2242 }
2241 UseCounter::count(frame(), feature); 2243 UseCounter::count(frame(), feature);
2242 } 2244 }
2243 2245
2246 WebInputMethodControllerImpl* WebLocalFrameImpl::inputMethodController() const
2247 {
2248 return m_inputMethodController.get();
2249 }
2250
2244 } // namespace blink 2251 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698