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

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

Issue 220333003: Apply OwnPtr|PassOwnPtr to handle member variables and arguments in MIDIClient (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 , m_isAcceleratedCompositingActive(false) 358 , m_isAcceleratedCompositingActive(false)
359 , m_layerTreeViewCommitsDeferred(false) 359 , m_layerTreeViewCommitsDeferred(false)
360 , m_compositorCreationFailed(false) 360 , m_compositorCreationFailed(false)
361 , m_recreatingGraphicsContext(false) 361 , m_recreatingGraphicsContext(false)
362 #if ENABLE(INPUT_SPEECH) 362 #if ENABLE(INPUT_SPEECH)
363 , m_speechInputClient(SpeechInputClientImpl::create(client)) 363 , m_speechInputClient(SpeechInputClientImpl::create(client))
364 #endif 364 #endif
365 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0)) 365 , m_speechRecognitionClient(SpeechRecognitionClientProxy::create(client ? cl ient->speechRecognizer() : 0))
366 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0))) 366 , m_geolocationClientProxy(adoptPtr(new GeolocationClientProxy(client ? clie nt->geolocationClient() : 0)))
367 , m_userMediaClientImpl(this) 367 , m_userMediaClientImpl(this)
368 , m_midiClientProxy(adoptPtr(new MIDIClientProxy(client ? client->webMIDICli ent() : 0)))
369 , m_flingModifier(0) 368 , m_flingModifier(0)
370 , m_flingSourceDevice(false) 369 , m_flingSourceDevice(false)
371 , m_fullscreenController(FullscreenController::create(this)) 370 , m_fullscreenController(FullscreenController::create(this))
372 , m_showFPSCounter(false) 371 , m_showFPSCounter(false)
373 , m_showPaintRects(false) 372 , m_showPaintRects(false)
374 , m_showDebugBorders(false) 373 , m_showDebugBorders(false)
375 , m_continuousPaintingEnabled(false) 374 , m_continuousPaintingEnabled(false)
376 , m_showScrollBottleneckRects(false) 375 , m_showScrollBottleneckRects(false)
377 , m_baseBackgroundColor(Color::white) 376 , m_baseBackgroundColor(Color::white)
378 , m_backgroundColorOverride(Color::transparent) 377 , m_backgroundColorOverride(Color::transparent)
379 , m_zoomFactorOverride(0) 378 , m_zoomFactorOverride(0)
380 { 379 {
381 Page::PageClients pageClients; 380 Page::PageClients pageClients;
382 pageClients.chromeClient = &m_chromeClientImpl; 381 pageClients.chromeClient = &m_chromeClientImpl;
383 pageClients.contextMenuClient = &m_contextMenuClientImpl; 382 pageClients.contextMenuClient = &m_contextMenuClientImpl;
384 pageClients.editorClient = &m_editorClientImpl; 383 pageClients.editorClient = &m_editorClientImpl;
385 pageClients.dragClient = &m_dragClientImpl; 384 pageClients.dragClient = &m_dragClientImpl;
386 pageClients.inspectorClient = &m_inspectorClientImpl; 385 pageClients.inspectorClient = &m_inspectorClientImpl;
387 pageClients.backForwardClient = &m_backForwardClientImpl; 386 pageClients.backForwardClient = &m_backForwardClientImpl;
388 pageClients.spellCheckerClient = &m_spellCheckerClientImpl; 387 pageClients.spellCheckerClient = &m_spellCheckerClientImpl;
389 pageClients.storageClient = &m_storageClientImpl; 388 pageClients.storageClient = &m_storageClientImpl;
390 389
391 m_page = adoptPtr(new Page(pageClients)); 390 m_page = adoptPtr(new Page(pageClients));
392 provideUserMediaTo(*m_page, &m_userMediaClientImpl); 391 provideUserMediaTo(*m_page, &m_userMediaClientImpl);
393 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl); 392 MediaKeysController::provideMediaKeysTo(*m_page, &m_mediaKeysClientImpl);
394 provideMIDITo(*m_page, m_midiClientProxy.get()); 393 provideMIDITo(*m_page, MIDIClientProxy::create(client ? client->webMIDIClien t() : 0));
395 #if ENABLE(INPUT_SPEECH) 394 #if ENABLE(INPUT_SPEECH)
396 provideSpeechInputTo(*m_page, m_speechInputClient.get()); 395 provideSpeechInputTo(*m_page, m_speechInputClient.get());
397 #endif 396 #endif
398 provideSpeechRecognitionTo(*m_page, m_speechRecognitionClient.get()); 397 provideSpeechRecognitionTo(*m_page, m_speechRecognitionClient.get());
399 provideNotification(*m_page, notificationPresenterImpl()); 398 provideNotification(*m_page, notificationPresenterImpl());
400 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this)); 399 provideNavigatorContentUtilsTo(*m_page, NavigatorContentUtilsClientImpl::cre ate(this));
401 400
402 provideContextFeaturesTo(*m_page, m_featureSwitchClient.get()); 401 provideContextFeaturesTo(*m_page, m_featureSwitchClient.get());
403 if (RuntimeEnabledFeatures::deviceOrientationEnabled()) 402 if (RuntimeEnabledFeatures::deviceOrientationEnabled())
404 DeviceOrientationInspectorAgent::provideTo(*m_page); 403 DeviceOrientationInspectorAgent::provideTo(*m_page);
(...skipping 3574 matching lines...) Expand 10 before | Expand all | Expand 10 after
3979 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints(); 3978 const PageScaleConstraints& constraints = m_pageScaleConstraintsSet.pageDefi nedConstraints();
3980 3979
3981 if (!mainFrameImpl() || !mainFrameImpl()->frameView()) 3980 if (!mainFrameImpl() || !mainFrameImpl()->frameView())
3982 return false; 3981 return false;
3983 3982
3984 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width 3983 return mainFrameImpl()->frameView()->layoutSize().width() == m_size.width
3985 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1); 3984 || (constraints.minimumScale == constraints.maximumScale && constraints. minimumScale != -1);
3986 } 3985 }
3987 3986
3988 } // namespace blink 3987 } // namespace blink
OLDNEW
« Source/web/MIDIClientProxy.cpp ('K') | « Source/web/MIDIClientProxy.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698