flutter_flutter/tools/debugger/navigator_host_impl.cc
Adam Barth 9a2441ce9e Make clicking links work in SkyDB
Now the SkyDebugger implements NavigatorHost and actually navigates the
mojo::View. This CL pulled a big refactor of sky/tools/debugger to separate out
MojoMain from debugger.cc.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/690363002
2014-10-31 13:17:15 -07:00

32 lines
819 B
C++

// 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 "sky/tools/debugger/navigator_host_impl.h"
#include "sky/tools/debugger/debugger.h"
namespace sky {
namespace debugger {
NavigatorHostImpl::NavigatorHostImpl(SkyDebugger* debugger)
: debugger_(debugger->GetWeakPtr()) {
}
NavigatorHostImpl::~NavigatorHostImpl() {
}
void NavigatorHostImpl::DidNavigateLocally(const mojo::String& url) {
// TODO(abarth): Do something interesting.
}
void NavigatorHostImpl::RequestNavigate(mojo::Target target,
mojo::URLRequestPtr request) {
if (!debugger_)
return;
debugger_->NavigateToURL(request->url);
}
} // namespace debugger
} // namespace sky