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

Side by Side Diff: Source/web/WebViewImpl.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) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 #include "public/web/WebWindowFeatures.h" 140 #include "public/web/WebWindowFeatures.h"
141 #include "web/CompositionUnderlineVectorBuilder.h" 141 #include "web/CompositionUnderlineVectorBuilder.h"
142 #include "web/ContextFeaturesClientImpl.h" 142 #include "web/ContextFeaturesClientImpl.h"
143 #include "web/DatabaseClientImpl.h" 143 #include "web/DatabaseClientImpl.h"
144 #include "web/FullscreenController.h" 144 #include "web/FullscreenController.h"
145 #include "web/GraphicsLayerFactoryChromium.h" 145 #include "web/GraphicsLayerFactoryChromium.h"
146 #include "web/LinkHighlight.h" 146 #include "web/LinkHighlight.h"
147 #include "web/NavigatorContentUtilsClientImpl.h" 147 #include "web/NavigatorContentUtilsClientImpl.h"
148 #include "web/PopupContainer.h" 148 #include "web/PopupContainer.h"
149 #include "web/PrerendererClientImpl.h" 149 #include "web/PrerendererClientImpl.h"
150 #include "web/SpeechRecognitionClientProxy.h"
151 #include "web/StorageQuotaClientImpl.h" 150 #include "web/StorageQuotaClientImpl.h"
152 #include "web/ValidationMessageClientImpl.h" 151 #include "web/ValidationMessageClientImpl.h"
153 #include "web/ViewportAnchor.h" 152 #include "web/ViewportAnchor.h"
154 #include "web/WebDevToolsAgentImpl.h" 153 #include "web/WebDevToolsAgentImpl.h"
155 #include "web/WebDevToolsAgentPrivate.h" 154 #include "web/WebDevToolsAgentPrivate.h"
156 #include "web/WebInputEventConversion.h" 155 #include "web/WebInputEventConversion.h"
157 #include "web/WebLocalFrameImpl.h" 156 #include "web/WebLocalFrameImpl.h"
158 #include "web/WebPagePopupImpl.h" 157 #include "web/WebPagePopupImpl.h"
159 #include "web/WebPluginContainerImpl.h" 158 #include "web/WebPluginContainerImpl.h"
160 #include "web/WebPopupMenuImpl.h" 159 #include "web/WebPopupMenuImpl.h"
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after
424 pageClients.chromeClient = &m_chromeClientImpl; 423 pageClients.chromeClient = &m_chromeClientImpl;
425 pageClients.contextMenuClient = &m_contextMenuClientImpl; 424 pageClients.contextMenuClient = &m_contextMenuClientImpl;
426 pageClients.editorClient = &m_editorClientImpl; 425 pageClients.editorClient = &m_editorClientImpl;
427 pageClients.dragClient = &m_dragClientImpl; 426 pageClients.dragClient = &m_dragClientImpl;
428 pageClients.inspectorClient = &m_inspectorClientImpl; 427 pageClients.inspectorClient = &m_inspectorClientImpl;
429 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; 428 pageClients.spellCheckerClient = &m_spellCheckerClientImpl;
430 pageClients.storageClient = &m_storageClientImpl; 429 pageClients.storageClient = &m_storageClientImpl;
431 430
432 m_page = adoptPtrWillBeNoop(new Page(pageClients)); 431 m_page = adoptPtrWillBeNoop(new Page(pageClients));
433 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); 432 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl);
434 provideSpeechRecognitionTo(*m_page, SpeechRecognitionClientProxy::create(cli ent ? client->speechRecognizer() : 0));
435 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this)); 433 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this));
436 434
437 provideContextFeaturesTo(*m_page, ContextFeaturesClientImpl::create()); 435 provideContextFeaturesTo(*m_page, ContextFeaturesClientImpl::create());
438 DeviceOrientationInspectorAgent::provideTo(*m_page); 436 DeviceOrientationInspectorAgent::provideTo(*m_page);
439 437
440 m_page->inspectorController().registerModuleAgent(InspectorFileSystemAgent:: create(m_page.get())); 438 m_page->inspectorController().registerModuleAgent(InspectorFileSystemAgent:: create(m_page.get()));
441 provideDatabaseClientTo(*m_page, DatabaseClientImpl::create()); 439 provideDatabaseClientTo(*m_page, DatabaseClientImpl::create());
442 InspectorIndexedDBAgent::provideTo(m_page.get()); 440 InspectorIndexedDBAgent::provideTo(m_page.get());
443 provideStorageQuotaClientTo(*m_page, StorageQuotaClientImpl::create()); 441 provideStorageQuotaClientTo(*m_page, StorageQuotaClientImpl::create());
444 m_page->setValidationMessageClient(ValidationMessageClientImpl::create(*this )); 442 m_page->setValidationMessageClient(ValidationMessageClientImpl::create(*this ));
(...skipping 4031 matching lines...) Expand 10 before | Expand all | Expand 10 after
4476 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 4474 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
4477 4475
4478 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 4476 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
4479 return false; 4477 return false;
4480 4478
4481 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 4479 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
4482 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 4480 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
4483 } 4481 }
4484 4482
4485 } // namespace blink 4483 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698