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

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

Issue 18325007: Web MIDI: introduce WebMIDIClient API to request a permission (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: address chris' review Created 7 years, 5 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/web/WebViewImpl.h ('k') | Source/web/web.gypi » ('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) 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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 , m_compositorCreationFailed(false) 415 , m_compositorCreationFailed(false)
416 , m_recreatingGraphicsContext(false) 416 , m_recreatingGraphicsContext(false)
417 #if ENABLE(INPUT_SPEECH) 417 #if ENABLE(INPUT_SPEECH)
418 , m_speechInputClient(SpeechInputClientImpl::create(client)) 418 , m_speechInputClient(SpeechInputClientImpl::create(client))
419 #endif 419 #endif
420 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0)) 420 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0))
421 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0))) 421 , m_deviceOrientationClientProxy(adoptPtr(new DeviceOrientationClientProxy(c lient ? client->deviceOrientationClient() : 0)))
422 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0))) 422 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
423 , m_emulatedTextZoomFactor(1) 423 , m_emulatedTextZoomFactor(1)
424 , m_userMediaClientImpl(this) 424 , m_userMediaClientImpl(this)
425 , m_midiClientImpl(this)
425 #if ENABLE(NAVIGATOR_CONTENT_UTILS) 426 #if ENABLE(NAVIGATOR_CONTENT_UTILS)
426 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this )) 427 , m_navigatorContentUtilsClient(NavigatorContentUtilsClientImpl::create(this ))
427 #endif 428 #endif
428 , m_flingModifier(0) 429 , m_flingModifier(0)
429 , m_flingSourceDevice(false) 430 , m_flingSourceDevice(false)
430 , m_showFPSCounter(false) 431 , m_showFPSCounter(false)
431 , m_showPaintRects(false) 432 , m_showPaintRects(false)
432 , m_showDebugBorders(false) 433 , m_showDebugBorders(false)
433 , m_continuousPaintingEnabled(false) 434 , m_continuousPaintingEnabled(false)
434 , m_showScrollBottleneckRects(false) 435 , m_showScrollBottleneckRects(false)
435 { 436 {
436 Page::PageClients pageClients; 437 Page::PageClients pageClients;
437 pageClients.chromeClient = &m_chromeClientImpl; 438 pageClients.chromeClient = &m_chromeClientImpl;
438 pageClients.contextMenuClient = &m_contextMenuClientImpl; 439 pageClients.contextMenuClient = &m_contextMenuClientImpl;
439 pageClients.editorClient = &m_editorClientImpl; 440 pageClients.editorClient = &m_editorClientImpl;
440 pageClients.dragClient = &m_dragClientImpl; 441 pageClients.dragClient = &m_dragClientImpl;
441 pageClients.inspectorClient = &m_inspectorClientImpl; 442 pageClients.inspectorClient = &m_inspectorClientImpl;
442 pageClients.backForwardClient = &m_backForwardClientImpl; 443 pageClients.backForwardClient = &m_backForwardClientImpl;
443 444
444 m_page = adoptPtr(new Page(pageClients)); 445 m_page = adoptPtr(new Page(pageClients));
445 provideUserMediaTo(m_page.get(), &m_userMediaClientImpl); 446 provideUserMediaTo(m_page.get(), &m_userMediaClientImpl);
447 provideMIDITo(m_page.get(), &m_midiClientImpl);
446 #if ENABLE(INPUT_SPEECH) 448 #if ENABLE(INPUT_SPEECH)
447 provideSpeechInputTo(m_page.get(), m_speechInputClient.get()); 449 provideSpeechInputTo(m_page.get(), m_speechInputClient.get());
448 #endif 450 #endif
449 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get()); 451 provideSpeechRecognitionTo(m_page.get(), m_speechRecognitionClient.get());
450 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) 452 #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS)
451 provideNotification(m_page.get(), notificationPresenterImpl()); 453 provideNotification(m_page.get(), notificationPresenterImpl());
452 #endif 454 #endif
453 #if ENABLE(NAVIGATOR_CONTENT_UTILS) 455 #if ENABLE(NAVIGATOR_CONTENT_UTILS)
454 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et()); 456 provideNavigatorContentUtilsTo(m_page.get(), m_navigatorContentUtilsClient.g et());
455 #endif 457 #endif
(...skipping 3707 matching lines...) Expand 10 before | Expand all | Expand 10 after
4163 } 4165 }
4164 4166
4165 bool WebViewImpl::shouldDisableDesktopWorkarounds() 4167 bool WebViewImpl::shouldDisableDesktopWorkarounds()
4166 { 4168 {
4167 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments(); 4169 ViewportArguments arguments = mainFrameImpl()->frame()->document()->viewport Arguments();
4168 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom 4170 return arguments.width == ViewportArguments::ValueDeviceWidth || !arguments. userZoom
4169 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto); 4171 || (arguments.minZoom == arguments.maxZoom && arguments.minZoom != Viewp ortArguments::ValueAuto);
4170 } 4172 }
4171 4173
4172 } // namespace WebKit 4174 } // namespace WebKit
OLDNEW
« no previous file with comments | « Source/web/WebViewImpl.h ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698