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

Unified Diff: services/kiosk_wm/navigator_host_impl.cc

Issue 1531403003: Delete the ViewManager and WindowManager services. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: rebase Created 4 years, 11 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 | « services/kiosk_wm/navigator_host_impl.h ('k') | services/view_manager/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/kiosk_wm/navigator_host_impl.cc
diff --git a/services/kiosk_wm/navigator_host_impl.cc b/services/kiosk_wm/navigator_host_impl.cc
deleted file mode 100644
index c9499be3b49e57710da927b6d5eab07177cc38c7..0000000000000000000000000000000000000000
--- a/services/kiosk_wm/navigator_host_impl.cc
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.
-
-#include "services/kiosk_wm/navigator_host_impl.h"
-
-#include "services/kiosk_wm/kiosk_wm_controller.h"
-
-namespace kiosk_wm {
-
-NavigatorHostImpl::NavigatorHostImpl(KioskWMController* window_manager)
- : current_index_(-1), kiosk_wm_(window_manager) {
-}
-
-NavigatorHostImpl::~NavigatorHostImpl() {
-}
-
-void NavigatorHostImpl::Bind(
- mojo::InterfaceRequest<mojo::NavigatorHost> request) {
- bindings_.AddBinding(this, request.Pass());
-}
-
-void NavigatorHostImpl::DidNavigateLocally(const mojo::String& url) {
- RecordNavigation(url);
- // TODO(abarth): Do something interesting.
-}
-
-void NavigatorHostImpl::RequestNavigate(mojo::Target target,
- mojo::URLRequestPtr request) {
- // kiosk_wm sets up default services including navigation.
- kiosk_wm_->ReplaceContentWithURL(request->url);
-}
-
-void NavigatorHostImpl::RequestNavigateHistory(int32_t delta) {
- if (history_.empty())
- return;
- current_index_ =
- std::max(0, std::min(current_index_ + delta,
- static_cast<int32_t>(history_.size()) - 1));
- kiosk_wm_->ReplaceContentWithURL(history_[current_index_]);
-}
-
-void NavigatorHostImpl::RecordNavigation(const std::string& url) {
- if (current_index_ >= 0 && history_[current_index_] == url) {
- // This is a navigation to the current entry, ignore.
- return;
- }
-
- history_.erase(history_.begin() + (current_index_ + 1), history_.end());
- history_.push_back(url);
- ++current_index_;
-}
-
-} // namespace kiosk_wm
« no previous file with comments | « services/kiosk_wm/navigator_host_impl.h ('k') | services/view_manager/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698