mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
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
32 lines
819 B
C++
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
|