blob: fbe082f06e4e27bfe75ed3bc9ffd21c67f204715 [file] [log] [blame]
// 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.
import "../network/url_loader.mojom"
module mojo.navigation {
struct NavigationDetails {
string url;
// TODO(aa): method, data, etc.
};
struct ResponseDetails {
// TODO(beng): consider providing access to URLRequest too. Currently it is
// not possible to obtain from the URLLoader.
mojo.URLResponse response;
handle<data_pipe_consumer> response_body_stream;
};
// Embedders that support navigation of implement this interface.
interface NavigatorHost {
RequestNavigate(uint32 source_node_id, NavigationDetails details);
};
// Applications implement this interface to support navigation of their views
// by embedders.
// |response_details| can be NULL when a navigation was not the result of a
// network load.
interface Navigator {
Navigate(uint32 node_id,
NavigationDetails navigation_details,
ResponseDetails response_details);
};
}