OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module mojo.shell.mojom; | 5 module mojo.shell.mojom; |
6 | 6 |
7 import "mojo/shell/public/interfaces/application.mojom"; | 7 import "mojo/shell/public/interfaces/shell_client.mojom"; |
8 import "network/public/interfaces/url_loader.mojom"; | 8 import "network/public/interfaces/url_loader.mojom"; |
9 | 9 |
10 // Interface implemented by content handlers. To avoid race conditions with | 10 // Interface implemented by content handlers. To avoid race conditions with |
11 // dropped requests, the implementation should keep a reference to the lifetime | 11 // dropped requests, the implementation should keep a reference to the lifetime |
12 // of the app (by holding on to AppRefCount). Each application started by | 12 // of the app (by holding on to AppRefCount). Each application started by |
13 // StartApplication should call the callback given by that method on | 13 // StartApplication should call the callback given by that method on |
14 // destruction. When the owner in the shell notices this, it will destroy the | 14 // destruction. When the owner in the shell notices this, it will destroy the |
15 // interface pointer, which should cause the strongly-bound ContentHandler | 15 // interface pointer, which should cause the strongly-bound ContentHandler |
16 // implementation to self destruct and release the app reference. | 16 // implementation to self destruct and release the app reference. |
17 interface ContentHandler { | 17 interface ContentHandler { |
18 // The callback should be called when the application is destructed. | 18 // The callback should be called when the application is destructed. |
19 StartApplication(Application& application, mojo.URLResponse response) => (); | 19 StartApplication(ShellClient& shell_client, mojo.URLResponse response) => (); |
20 }; | 20 }; |
OLD | NEW |