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

Unified Diff: services/kiosk_wm/navigator_host_impl.h

Issue 1536713004: Revert "Delete the ViewManager and WindowManager services." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « services/kiosk_wm/merged_service_provider.cc ('k') | 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: services/kiosk_wm/navigator_host_impl.h
diff --git a/services/kiosk_wm/navigator_host_impl.h b/services/kiosk_wm/navigator_host_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..5c494da072c3add54f0aabb94a8a97ab9c246ef7
--- /dev/null
+++ b/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/binding_set.h"
+#include "mojo/public/cpp/bindings/interface_request.h"
+#include "mojo/services/navigation/interfaces/navigation.mojom.h"
+
+namespace kiosk_wm {
+class KioskWMController;
+
+class NavigatorHostImpl : public mojo::NavigatorHost {
+ public:
+ NavigatorHostImpl(KioskWMController* 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_;
+
+ KioskWMController* kiosk_wm_;
+ mojo::BindingSet<NavigatorHost> bindings_;
+
+ DISALLOW_COPY_AND_ASSIGN(NavigatorHostImpl);
+};
+
+} // namespace kiosk_wm
+
+#endif // SERVICES_KIOSK_WM_NAVIGATOR_HOST_IMPL_H_
« no previous file with comments | « services/kiosk_wm/merged_service_provider.cc ('k') | services/kiosk_wm/navigator_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698