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

Side by Side Diff: Source/core/html/shadow/TextControlInnerElements.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address comments. Created 6 years, 8 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/html/shadow/DateTimeEditElement.cpp ('k') | Source/core/page/DOMSelection.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) 2006, 2008, 2010 Apple Inc. All rights reserved. 2 * Copyright (C) 2006, 2008, 2010 Apple Inc. All rights reserved.
3 * Copyright (C) 2010 Google Inc. All rights reserved. 3 * Copyright (C) 2010 Google 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 * 1. Redistributions of source code must retain the above copyright 8 * 1. 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 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 inline InputFieldSpeechButtonElement::InputFieldSpeechButtonElement(Document& do cument) 257 inline InputFieldSpeechButtonElement::InputFieldSpeechButtonElement(Document& do cument)
258 : HTMLDivElement(document) 258 : HTMLDivElement(document)
259 , m_capturing(false) 259 , m_capturing(false)
260 , m_state(Idle) 260 , m_state(Idle)
261 , m_listenerId(0) 261 , m_listenerId(0)
262 { 262 {
263 } 263 }
264 264
265 InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement() 265 InputFieldSpeechButtonElement::~InputFieldSpeechButtonElement()
266 { 266 {
267 #if !ENABLE(OILPAN)
268 // With Oilpan, this cleanup is handled with weak processing of the
269 // SpeechInputs.
267 SpeechInput* speech = speechInput(); 270 SpeechInput* speech = speechInput();
268 if (speech && m_listenerId) { // Could be null when page is unloading. 271 if (speech && m_listenerId) { // Could be null when page is unloading.
269 if (m_state != Idle) 272 if (m_state != Idle)
270 speech->cancelRecognition(m_listenerId); 273 speech->cancelRecognition(m_listenerId);
271 speech->unregisterListener(m_listenerId); 274 speech->unregisterListener(m_listenerId);
272 } 275 }
276 #endif
273 } 277 }
274 278
275 PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create( Document& document) 279 PassRefPtr<InputFieldSpeechButtonElement> InputFieldSpeechButtonElement::create( Document& document)
276 { 280 {
277 RefPtr<InputFieldSpeechButtonElement> element = adoptRef(new InputFieldSpeec hButtonElement(document)); 281 RefPtr<InputFieldSpeechButtonElement> element = adoptRef(new InputFieldSpeec hButtonElement(document));
278 element->setShadowPseudoId(AtomicString("-webkit-input-speech-button", Atomi cString::ConstructFromLiteral)); 282 element->setShadowPseudoId(AtomicString("-webkit-input-speech-button", Atomi cString::ConstructFromLiteral));
279 element->setAttribute(idAttr, ShadowElementNames::speechButton()); 283 element->setAttribute(idAttr, ShadowElementNames::speechButton());
280 return element.release(); 284 return element.release();
281 } 285 }
282 286
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 } 446 }
443 447
444 void InputFieldSpeechButtonElement::stopSpeechInput() 448 void InputFieldSpeechButtonElement::stopSpeechInput()
445 { 449 {
446 if (m_state == Recording) 450 if (m_state == Recording)
447 speechInput()->stopRecording(m_listenerId); 451 speechInput()->stopRecording(m_listenerId);
448 } 452 }
449 #endif // ENABLE(INPUT_SPEECH) 453 #endif // ENABLE(INPUT_SPEECH)
450 454
451 } 455 }
OLDNEW
« no previous file with comments | « Source/core/html/shadow/DateTimeEditElement.cpp ('k') | Source/core/page/DOMSelection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698