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

Side by Side Diff: Source/core/testing/Internals.cpp

Issue 176953009: Move testRunner.startSpeechInput/setValueForUser to internals (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: (rebasing) Created 6 years, 9 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/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('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) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * Copyright (C) 2013 Apple Inc. All rights reserved. 3 * Copyright (C) 2013 Apple Inc. All rights reserved.
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 6 * modification, are permitted provided that the following conditions
7 * are met: 7 * are met:
8 * 8 *
9 * 1. Redistributions of source code must retain the above copyright 9 * 1. 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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "core/frame/FrameView.h" 82 #include "core/frame/FrameView.h"
83 #include "core/frame/LocalFrame.h" 83 #include "core/frame/LocalFrame.h"
84 #include "core/frame/Settings.h" 84 #include "core/frame/Settings.h"
85 #include "core/html/HTMLContentElement.h" 85 #include "core/html/HTMLContentElement.h"
86 #include "core/html/HTMLIFrameElement.h" 86 #include "core/html/HTMLIFrameElement.h"
87 #include "core/html/HTMLInputElement.h" 87 #include "core/html/HTMLInputElement.h"
88 #include "core/html/HTMLMediaElement.h" 88 #include "core/html/HTMLMediaElement.h"
89 #include "core/html/HTMLSelectElement.h" 89 #include "core/html/HTMLSelectElement.h"
90 #include "core/html/HTMLTextAreaElement.h" 90 #include "core/html/HTMLTextAreaElement.h"
91 #include "core/html/forms/FormController.h" 91 #include "core/html/forms/FormController.h"
92 #include "core/html/shadow/ShadowElementNames.h"
93 #include "core/html/shadow/TextControlInnerElements.h"
92 #include "core/inspector/InspectorClient.h" 94 #include "core/inspector/InspectorClient.h"
93 #include "core/inspector/InspectorConsoleAgent.h" 95 #include "core/inspector/InspectorConsoleAgent.h"
94 #include "core/inspector/InspectorController.h" 96 #include "core/inspector/InspectorController.h"
95 #include "core/inspector/InspectorCounters.h" 97 #include "core/inspector/InspectorCounters.h"
96 #include "core/inspector/InspectorFrontendChannel.h" 98 #include "core/inspector/InspectorFrontendChannel.h"
97 #include "core/inspector/InspectorInstrumentation.h" 99 #include "core/inspector/InspectorInstrumentation.h"
98 #include "core/inspector/InspectorOverlay.h" 100 #include "core/inspector/InspectorOverlay.h"
99 #include "core/inspector/InstrumentingAgents.h" 101 #include "core/inspector/InstrumentingAgents.h"
100 #include "core/loader/FrameLoader.h" 102 #include "core/loader/FrameLoader.h"
101 #include "core/loader/HistoryItem.h" 103 #include "core/loader/HistoryItem.h"
(...skipping 2278 matching lines...) Expand 10 before | Expand all | Expand 10 after
2380 { 2382 {
2381 return promise.then(AddOneFunction::create(context)); 2383 return promise.then(AddOneFunction::create(context));
2382 } 2384 }
2383 2385
2384 void Internals::trace(Visitor* visitor) 2386 void Internals::trace(Visitor* visitor)
2385 { 2387 {
2386 visitor->trace(m_runtimeFlags); 2388 visitor->trace(m_runtimeFlags);
2387 visitor->trace(m_profilers); 2389 visitor->trace(m_profilers);
2388 } 2390 }
2389 2391
2392 void Internals::startSpeechInput(Element* element)
2393 {
2394 #if ENABLE(INPUT_SPEECH)
2395 HTMLInputElement* input = toHTMLInputElement(element);
2396 if (!input->isSpeechEnabled())
2397 return;
2398
2399 InputFieldSpeechButtonElement* speechButton = toInputFieldSpeechButtonElemen t(input->userAgentShadowRoot()->getElementById(ShadowElementNames::speechButton( )));
2400 if (speechButton)
2401 speechButton->startSpeechInput();
2402 #endif
2390 } 2403 }
2404
2405 void Internals::setValueForUser(Element* element, const String& value)
2406 {
2407 toHTMLInputElement(element)->setValueForUser(value);
2408 }
2409
2410 }
OLDNEW
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698