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

Side by Side Diff: third_party/WebKit/Source/modules/shapedetection/BarcodeDetector.cpp

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 4 years 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "modules/shapedetection/BarcodeDetector.h" 5 #include "modules/shapedetection/BarcodeDetector.h"
6 6
7 #include "core/dom/DOMException.h" 7 #include "core/dom/DOMException.h"
8 #include "core/dom/DOMRect.h" 8 #include "core/dom/DOMRect.h"
9 #include "core/frame/LocalDOMWindow.h" 9 #include "core/frame/LocalDOMWindow.h"
10 #include "core/frame/LocalFrame.h" 10 #include "core/frame/LocalFrame.h"
11 #include "core/html/canvas/CanvasImageSource.h" 11 #include "core/html/canvas/CanvasImageSource.h"
12 #include "modules/imagecapture/Point2D.h" 12 #include "modules/imagecapture/Point2D.h"
13 #include "modules/shapedetection/DetectedBarcode.h" 13 #include "modules/shapedetection/DetectedBarcode.h"
14 #include "public/platform/InterfaceProvider.h" 14 #include "public/platform/InterfaceProvider.h"
15 15
16 namespace blink { 16 namespace blink {
17 17
18 BarcodeDetector* BarcodeDetector::create(Document& document) { 18 BarcodeDetector* BarcodeDetector::create(Document& document) {
19 return new BarcodeDetector(*document.frame()); 19 return new BarcodeDetector(*document.frame());
20 } 20 }
21 21
22 BarcodeDetector::BarcodeDetector(LocalFrame& frame) : ShapeDetector(frame) { 22 BarcodeDetector::BarcodeDetector(LocalFrame& frame) : ShapeDetector(frame) {
23 frame.interfaceProvider()->getInterface(mojo::GetProxy(&m_barcodeService)); 23 frame.interfaceProvider()->getInterface(mojo::MakeRequest(&m_barcodeService));
24 m_barcodeService.set_connection_error_handler(convertToBaseCallback( 24 m_barcodeService.set_connection_error_handler(convertToBaseCallback(
25 WTF::bind(&BarcodeDetector::onBarcodeServiceConnectionError, 25 WTF::bind(&BarcodeDetector::onBarcodeServiceConnectionError,
26 wrapWeakPersistent(this)))); 26 wrapWeakPersistent(this))));
27 } 27 }
28 28
29 ScriptPromise BarcodeDetector::doDetect( 29 ScriptPromise BarcodeDetector::doDetect(
30 ScriptPromiseResolver* resolver, 30 ScriptPromiseResolver* resolver,
31 mojo::ScopedSharedBufferHandle sharedBufferHandle, 31 mojo::ScopedSharedBufferHandle sharedBufferHandle,
32 int imageWidth, 32 int imageWidth,
33 int imageHeight) { 33 int imageHeight) {
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 m_barcodeServiceRequests.clear(); 80 m_barcodeServiceRequests.clear();
81 m_barcodeService.reset(); 81 m_barcodeService.reset();
82 } 82 }
83 83
84 DEFINE_TRACE(BarcodeDetector) { 84 DEFINE_TRACE(BarcodeDetector) {
85 ShapeDetector::trace(visitor); 85 ShapeDetector::trace(visitor);
86 visitor->trace(m_barcodeServiceRequests); 86 visitor->trace(m_barcodeServiceRequests);
87 } 87 }
88 88
89 } // namespace blink 89 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698