| Index: mojo/services/kiosk_wm/navigator_host_impl.h
|
| diff --git a/mojo/services/kiosk_wm/navigator_host_impl.h b/mojo/services/kiosk_wm/navigator_host_impl.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..bf47a976dd02ae7e48db7cd6a1e54161c3d8ebfc
|
| --- /dev/null
|
| +++ b/mojo/services/kiosk_wm/navigator_host_impl.h
|
| @@ -0,0 +1,43 @@
|
| +// Copyright 2014 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#ifndef SERVICES_KIOSK_WM_NAVIGATOR_HOST_IMPL_H_
|
| +#define SERVICES_KIOSK_WM_NAVIGATOR_HOST_IMPL_H_
|
| +
|
| +#include "base/memory/weak_ptr.h"
|
| +#include "mojo/common/weak_binding_set.h"
|
| +#include "mojo/public/cpp/bindings/interface_request.h"
|
| +#include "third_party/mojo_services/src/navigation/public/interfaces/navigation.mojom.h"
|
| +
|
| +namespace kiosk_wm {
|
| +class KioskWM;
|
| +
|
| +class NavigatorHostImpl : public mojo::NavigatorHost {
|
| + public:
|
| + NavigatorHostImpl(KioskWM* kiosk_wm);
|
| + ~NavigatorHostImpl() override;
|
| +
|
| + void Bind(mojo::InterfaceRequest<mojo::NavigatorHost> request);
|
| +
|
| + void RecordNavigation(const std::string& url);
|
| +
|
| + // mojo::NavigatorHost implementation:
|
| + void DidNavigateLocally(const mojo::String& url) override;
|
| + void RequestNavigate(mojo::Target target,
|
| + mojo::URLRequestPtr request) override;
|
| + void RequestNavigateHistory(int32_t delta) override;
|
| +
|
| + private:
|
| + std::vector<std::string> history_;
|
| + int32_t current_index_;
|
| +
|
| + KioskWM* kiosk_wm_;
|
| + mojo::WeakBindingSet<NavigatorHost> bindings_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(NavigatorHostImpl);
|
| +};
|
| +
|
| +} // namespace kiosk_wm
|
| +
|
| +#endif // SERVICES_KIOSK_WM_NAVIGATOR_HOST_IMPL_H_
|
|
|