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 chrome.app.runtime.onEmbedRequested.addListener(function(request) { | 5 chrome.app.runtime.onEmbedRequested.addListener(function(request) { |
6 if (!request.data.foo) { | 6 if (!request.data.foo) { |
7 request.allow('main.html'); | 7 request.allow('main.html'); |
8 return; | 8 return; |
9 } else if (request.data.foo == 'bar') { | 9 } else if (request.data.foo == 'bar') { |
10 request.deny(); | 10 request.deny(); |
11 } else if (request.data.foo == 'bleep') { | 11 } else if (request.data.foo == 'bleep') { |
12 request.allow('main.html'); | 12 request.allow('main.html'); |
13 } | 13 } |
14 }); | 14 }); |
15 | 15 |
OLD | NEW |