OLD | NEW |
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 925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
936 return frame()->localDOMWindow()->pendingUnloadEventListeners(); | 936 return frame()->localDOMWindow()->pendingUnloadEventListeners(); |
937 } | 937 } |
938 | 938 |
939 void WebLocalFrameImpl::replaceSelection(const WebString& text) | 939 void WebLocalFrameImpl::replaceSelection(const WebString& text) |
940 { | 940 { |
941 bool selectReplacement = frame()->editor().behavior().shouldSelectReplacemen
t(); | 941 bool selectReplacement = frame()->editor().behavior().shouldSelectReplacemen
t(); |
942 bool smartReplace = true; | 942 bool smartReplace = true; |
943 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); | 943 frame()->editor().replaceSelectionWithText(text, selectReplacement, smartRep
lace); |
944 } | 944 } |
945 | 945 |
946 void WebLocalFrameImpl::insertText(const WebString& text) | |
947 { | |
948 if (frame()->inputMethodController().hasComposition()) | |
949 frame()->inputMethodController().confirmComposition(text); | |
950 else | |
951 frame()->editor().insertText(text, 0); | |
952 } | |
953 | |
954 void WebLocalFrameImpl::setMarkedText(const WebString& text, unsigned location,
unsigned length) | 946 void WebLocalFrameImpl::setMarkedText(const WebString& text, unsigned location,
unsigned length) |
955 { | 947 { |
956 Vector<CompositionUnderline> decorations; | 948 Vector<CompositionUnderline> decorations; |
957 frame()->inputMethodController().setComposition(text, decorations, location,
length); | 949 frame()->inputMethodController().setComposition(text, decorations, location,
length); |
958 } | 950 } |
959 | 951 |
960 void WebLocalFrameImpl::unmarkText() | 952 void WebLocalFrameImpl::unmarkText() |
961 { | 953 { |
962 frame()->inputMethodController().cancelComposition(); | 954 frame()->inputMethodController().cancelComposition(); |
963 } | 955 } |
(...skipping 1231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; | 2187 feature = UseCounter::ChromeLoadTimesNpnNegotiatedProtocol; |
2196 } else if (metric == "wasAlternateProtocolAvailable") { | 2188 } else if (metric == "wasAlternateProtocolAvailable") { |
2197 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; | 2189 feature = UseCounter::ChromeLoadTimesWasAlternateProtocolAvailable; |
2198 } else if (metric == "connectionInfo") { | 2190 } else if (metric == "connectionInfo") { |
2199 feature = UseCounter::ChromeLoadTimesConnectionInfo; | 2191 feature = UseCounter::ChromeLoadTimesConnectionInfo; |
2200 } | 2192 } |
2201 UseCounter::count(frame(), feature); | 2193 UseCounter::count(frame(), feature); |
2202 } | 2194 } |
2203 | 2195 |
2204 } // namespace blink | 2196 } // namespace blink |
OLD | NEW |