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

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

Issue 636863002: Make SpeechRecognitionController per frame instead of per page. Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: rebase Created 6 years, 1 month 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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 #include "core/rendering/RenderLayer.h" 145 #include "core/rendering/RenderLayer.h"
146 #include "core/rendering/RenderObject.h" 146 #include "core/rendering/RenderObject.h"
147 #include "core/rendering/RenderTreeAsText.h" 147 #include "core/rendering/RenderTreeAsText.h"
148 #include "core/rendering/RenderView.h" 148 #include "core/rendering/RenderView.h"
149 #include "core/rendering/style/StyleInheritedData.h" 149 #include "core/rendering/style/StyleInheritedData.h"
150 #include "core/timing/Performance.h" 150 #include "core/timing/Performance.h"
151 #include "modules/geolocation/GeolocationController.h" 151 #include "modules/geolocation/GeolocationController.h"
152 #include "modules/notifications/NotificationController.h" 152 #include "modules/notifications/NotificationController.h"
153 #include "modules/notifications/NotificationPermissionClient.h" 153 #include "modules/notifications/NotificationPermissionClient.h"
154 #include "modules/screen_orientation/ScreenOrientationController.h" 154 #include "modules/screen_orientation/ScreenOrientationController.h"
155 #include "modules/speech/SpeechRecognitionController.h"
155 #include "platform/TraceEvent.h" 156 #include "platform/TraceEvent.h"
156 #include "platform/UserGestureIndicator.h" 157 #include "platform/UserGestureIndicator.h"
157 #include "platform/clipboard/ClipboardUtilities.h" 158 #include "platform/clipboard/ClipboardUtilities.h"
158 #include "platform/fonts/FontCache.h" 159 #include "platform/fonts/FontCache.h"
159 #include "platform/graphics/GraphicsContext.h" 160 #include "platform/graphics/GraphicsContext.h"
160 #include "platform/graphics/GraphicsLayerClient.h" 161 #include "platform/graphics/GraphicsLayerClient.h"
161 #include "platform/graphics/skia/SkiaUtils.h" 162 #include "platform/graphics/skia/SkiaUtils.h"
162 #include "platform/heap/Handle.h" 163 #include "platform/heap/Handle.h"
163 #include "platform/network/ResourceRequest.h" 164 #include "platform/network/ResourceRequest.h"
164 #include "platform/scroll/ScrollTypes.h" 165 #include "platform/scroll/ScrollTypes.h"
(...skipping 29 matching lines...) Expand all
194 #include "public/web/WebSerializedScriptValue.h" 195 #include "public/web/WebSerializedScriptValue.h"
195 #include "web/AssociatedURLLoader.h" 196 #include "web/AssociatedURLLoader.h"
196 #include "web/CompositionUnderlineVectorBuilder.h" 197 #include "web/CompositionUnderlineVectorBuilder.h"
197 #include "web/FindInPageCoordinates.h" 198 #include "web/FindInPageCoordinates.h"
198 #include "web/GeolocationClientProxy.h" 199 #include "web/GeolocationClientProxy.h"
199 #include "web/LocalFileSystemClient.h" 200 #include "web/LocalFileSystemClient.h"
200 #include "web/MIDIClientProxy.h" 201 #include "web/MIDIClientProxy.h"
201 #include "web/NotificationPermissionClientImpl.h" 202 #include "web/NotificationPermissionClientImpl.h"
202 #include "web/PageOverlay.h" 203 #include "web/PageOverlay.h"
203 #include "web/SharedWorkerRepositoryClientImpl.h" 204 #include "web/SharedWorkerRepositoryClientImpl.h"
205 #include "web/SpeechRecognitionClientProxy.h"
204 #include "web/SuspendableScriptExecutor.h" 206 #include "web/SuspendableScriptExecutor.h"
205 #include "web/TextFinder.h" 207 #include "web/TextFinder.h"
206 #include "web/WebDataSourceImpl.h" 208 #include "web/WebDataSourceImpl.h"
207 #include "web/WebDevToolsAgentPrivate.h" 209 #include "web/WebDevToolsAgentPrivate.h"
208 #include "web/WebPluginContainerImpl.h" 210 #include "web/WebPluginContainerImpl.h"
209 #include "web/WebRemoteFrameImpl.h" 211 #include "web/WebRemoteFrameImpl.h"
210 #include "web/WebViewImpl.h" 212 #include "web/WebViewImpl.h"
211 #include "wtf/CurrentTime.h" 213 #include "wtf/CurrentTime.h"
212 #include "wtf/HashMap.h" 214 #include "wtf/HashMap.h"
213 #include <algorithm> 215 #include <algorithm>
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after
1585 if (m_client) 1587 if (m_client)
1586 notificationPresenter->initialize(m_client->notificationPresenter()) ; 1588 notificationPresenter->initialize(m_client->notificationPresenter()) ;
1587 1589
1588 provideNotification(*m_frame, notificationPresenter.release()); 1590 provideNotification(*m_frame, notificationPresenter.release());
1589 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create()); 1591 provideNotificationPermissionClientTo(*m_frame, NotificationPermissionCl ientImpl::create());
1590 provideUserMediaTo(*m_frame, &m_userMediaClientImpl); 1592 provideUserMediaTo(*m_frame, &m_userMediaClientImpl);
1591 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get()); 1593 provideGeolocationTo(*m_frame, m_geolocationClientProxy.get());
1592 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get())); 1594 m_geolocationClientProxy->setController(GeolocationController::from(m_fr ame.get()));
1593 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0)); 1595 provideMIDITo(*m_frame, MIDIClientProxy::create(m_client ? m_client->web MIDIClient() : 0));
1594 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create()); 1596 provideLocalFileSystemTo(*m_frame, LocalFileSystemClient::create());
1597 SpeechRecognitionController::provideTo(*m_frame, SpeechRecognitionClient Proxy::create(m_client ? m_client->speechRecognizer() : 0));
Mike West 2014/11/11 05:50:47 s/0/nullptr/g You could fix this whole method, if
mlamouri (slow - plz ping) 2014/11/28 10:43:04 Done.
1595 1598
1596 if (RuntimeEnabledFeatures::screenOrientationEnabled()) 1599 if (RuntimeEnabledFeatures::screenOrientationEnabled())
1597 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0); 1600 ScreenOrientationController::provideTo(*m_frame, m_client ? m_client ->webScreenOrientationClient() : 0);
1598 } 1601 }
1599 } 1602 }
1600 1603
1601 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName) 1604 PassRefPtrWillBeRawPtr<LocalFrame> WebLocalFrameImpl::initializeCoreFrame(FrameH ost* host, FrameOwner* owner, const AtomicString& name, const AtomicString& fall backName)
1602 { 1605 {
1603 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner); 1606 RefPtrWillBeRawPtr<LocalFrame> frame = LocalFrame::create(&m_frameLoaderClie ntImpl, host, owner);
1604 setCoreFrame(frame); 1607 setCoreFrame(frame);
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 1972
1970 void WebLocalFrameImpl::invalidateAll() const 1973 void WebLocalFrameImpl::invalidateAll() const
1971 { 1974 {
1972 ASSERT(frame() && frame()->view()); 1975 ASSERT(frame() && frame()->view());
1973 FrameView* view = frame()->view(); 1976 FrameView* view = frame()->view();
1974 view->invalidateRect(view->frameRect()); 1977 view->invalidateRect(view->frameRect());
1975 invalidateScrollbar(); 1978 invalidateScrollbar();
1976 } 1979 }
1977 1980
1978 } // namespace blink 1981 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698