Home | History | Annotate | Download | only in launcher
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 import "../navigation/navigation.mojom"
      6 
      7 module mojo.launcher {
      8 
      9 [Client=LauncherClient]
     10 interface Launcher {
     11   // Determines the correct handler application that can render a given URL.
     12   //
     13   // Sometimes this is known statically from the URL (e.g., from its scheme, or
     14   // because we already have an application locally that has said it can handle
     15   // the URL. Other times, we will actually fetch |url| to examine its
     16   // content-type and/or sniff it to determine the correct handler.
     17   Launch(string url);
     18 };
     19 
     20 [Client=Launcher]
     21 interface LauncherClient {
     22   // Called when a handler has been resolved in response to Launch(). Receiving
     23   // application should connect to the application at |handler_url| and navigate
     24   // it to |view_url|.
     25   //
     26   // Note: |view_url| might not be the same as the URL that was initially
     27   // requested, e.g., in the case of redirects. Applications should always
     28   // navigate to view_url, not the initial URL.
     29   //
     30   // Note: |response| can be NULL in the case where a request was not needed to
     31   // determine the correct handler.
     32   OnLaunch(string handler_url, string view_url,
     33            mojo.navigation.ResponseDetails response);
     34 };
     35 
     36 }
     37