18e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project/*
2f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch * Copyright (C) 2010 Google Inc. All rights reserved.
38e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
48e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * Redistribution and use in source and binary forms, with or without
58e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * modification, are permitted provided that the following conditions
68e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * are met:
78e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
88e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 1.  Redistributions of source code must retain the above copyright
98e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *     notice, this list of conditions and the following disclaimer.
108e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * 2.  Redistributions in binary form must reproduce the above copyright
118e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *     notice, this list of conditions and the following disclaimer in the
128e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *     documentation and/or other materials provided with the distribution.
138e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project *
148e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
158e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
168e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
178e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
188e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
198e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
208e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
218e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
228e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
238e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
248e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project */
258e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project
260bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch#include "config.h"
27f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "WebGeolocationController.h"
280bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
29f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "GeolocationController.h"
30f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "GeolocationError.h"
31f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "GeolocationPosition.h"
32f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "WebGeolocationError.h"
33f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include "WebGeolocationPosition.h"
340bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
35f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include <wtf/PassRefPtr.h>
36f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch#include <wtf/RefPtr.h>
370bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
38f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochusing namespace WebCore;
39967717af5423377c967781471ee106e2bb4e11c8Ben Murdoch
40f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochnamespace WebKit {
410bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
42f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochvoid WebGeolocationController::positionChanged(const WebGeolocationPosition& webPosition)
430bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch{
44f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    m_private->positionChanged(PassRefPtr<GeolocationPosition>(webPosition).get());
450bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch}
460bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch
47f05b935882198ccf7d81675736e3aeb089c5113aBen Murdochvoid WebGeolocationController::errorOccurred(const WebGeolocationError& webError)
480bf48ef3be53ddaa52bbead65dfd75bf90e7a2b5Ben Murdoch{
49f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch    m_private->errorOccurred(PassRefPtr<GeolocationError>(webError).get());
508e35f3cfc7fba1d1c829dc557ebad6409cbe16a2The Android Open Source Project}
51f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch
52f05b935882198ccf7d81675736e3aeb089c5113aBen Murdoch} // namespace WebKit
53