| // 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 "mojo/services/public/interfaces/navigation/navigation.mojom" |
| |
| module mojo.launcher { |
| |
| interface Launcher { |
| // Determines the correct handler application that can render a given URL. |
| // |
| // Sometimes this is known statically from the URL (e.g., from its scheme, or |
| // because we already have an application locally that has said it can handle |
| // the URL. Other times, we will actually fetch |url| to examine its |
| // content-type and/or sniff it to determine the correct handler. |
| // |
| // When the caller receives the result, it should connect to the application |
| // at |handler_url| and navigate it to |view_url|. |
| // |
| // Note: |view_url| might not be the same as |url|, e.g., in the case of |
| // redirects. Applications should navigate to view_url, not |url| or |
| // response->url. |
| // |
| // Note: |response| can be NULL in the case where a request was not needed to |
| // determine the correct handler. |
| Launch(string url) => (string handler_url, string view_url, |
| mojo.navigation.ResponseDetails response); |
| }; |
| |
| } |