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

Unified Diff: mojo/services/kiosk_wm/navigator_host_impl.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/services/kiosk_wm/merged_service_provider.cc ('k') | mojo/services/kiosk_wm/navigator_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_
« no previous file with comments | « mojo/services/kiosk_wm/merged_service_provider.cc ('k') | mojo/services/kiosk_wm/navigator_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698