forked from lazyboy/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Istiaque Ahmed
committed
Jul 9, 2013
1 parent
3135958
commit 4d336f5
Showing
7 changed files
with
110 additions
and
0 deletions.
There are no files selected for viewing
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
New style simple (chromium) platform app. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- | ||
* Copyright 2013 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. | ||
--> | ||
<html> | ||
<head> | ||
<script type="text/javascript" src="main.js"></script> | ||
</head> | ||
<body> | ||
<div> | ||
<div>Embedder</div> | ||
|
||
<!-- | ||
<div style="display: inline-block"> | ||
<div>Guest 0 does geo request from top level and iframe</div> | ||
<webview id="webview0" src="http://jsbin.com/egekod/6" style="border: 1px solid gray; height: 320px;"></webview> | ||
</div> | ||
--> | ||
|
||
<div style="display: inline-block"> | ||
<div>Guest</div> | ||
<webview id="webview1" src="http://jsbin.com/egekod/1" style="border: 1px solid gray; height: 320px;"></webview> | ||
</div> | ||
<!-- | ||
<div style="display: inline-block"> | ||
<div>Guest 2 has iframe in it</div> | ||
<webview id="webview2" src="http://jsbin.com/egekod/1" style="border: 1px solid gray; height: 320px;"></webview> | ||
</div> | ||
<div style="display: inline-block"> | ||
<div>Guest 3 has geo request in both top level and iframe</div> | ||
<webview id="webview3" src="http://jsbin.com/egekod/2" style="border: 1px solid gray; height: 320px;"></webview> | ||
</div> | ||
<div style="display: inline-block"> | ||
<div>Guest 4 does geo request simultaneously in both top level and iframe</div> | ||
<webview id="webview4" src="http://jsbin.com/omiriw/1" style="border: 1px solid gray; height: 320px;"></webview> | ||
</div> | ||
--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
window.onload = function() { | ||
var webview1 = document.getElementById('webview1'); | ||
webview1.addEventListener('permissionrequest', function(e) { | ||
window.console.log('Embedder got permissionrequest (1)'); | ||
window.console.log('permissionrequest.type: ' + e.type); | ||
//e.request.allow(); | ||
//e.request.deny(); | ||
window.console.log('going to preventDefault'); | ||
e.preventDefault(); | ||
}); | ||
//document.querySelector('webview').src = 'http://jsbin.com/azayiv/1'; | ||
if (1 ==1) return; | ||
|
||
var webview2 = document.getElementById('webview2'); | ||
webview2.addEventListener('permissionrequest', function(e) { | ||
window.console.log('Embedder got permissionrequest (2)'); | ||
window.console.log('permissionrequest.type: ' + e.type); | ||
e.request.allow(); | ||
//e.request.deny(); | ||
}); | ||
|
||
var webview3 = document.getElementById('webview3'); | ||
webview3.addEventListener('permissionrequest', function(e) { | ||
window.console.log('Embedder got permissionrequest (3)'); | ||
window.console.log('permissionrequest.type: ' + e.type); | ||
e.request.allow(); | ||
//e.request.deny(); | ||
}); | ||
|
||
var webview4 = document.getElementById('webview4'); | ||
webview4.addEventListener('permissionrequest', function(e) { | ||
window.console.log('Embedder got permissionrequest (4)'); | ||
window.console.log('permissionrequest.type: ' + e.type); | ||
e.request.allow(); | ||
//e.request.deny(); | ||
}); | ||
|
||
var webview0 = document.getElementById('webview0'); | ||
webview0.addEventListener('permissionrequest', function(e) { | ||
window.console.log('Embedder got permissionrequest (0)'); | ||
window.console.log('permissionrequest.type: ' + e.type); | ||
e.request.allow(); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"manifest_version": 2, | ||
"name": "Webview.guest.geolocation", | ||
"version": "1", | ||
"minimum_chrome_version": "23", | ||
"permissions": [ | ||
"webview", | ||
"geolocation" | ||
], | ||
"app": { | ||
"background": { | ||
"scripts": ["test.js"] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/** | ||
* Listens for the app launching then creates the window | ||
* | ||
* @see http://developer.chrome.com/trunk/apps/app.runtime.html | ||
* @see http://developer.chrome.com/trunk/apps/app.window.html | ||
*/ | ||
chrome.app.runtime.onLaunched.addListener(function() { | ||
chrome.app.window.create('main.html', | ||
{width: 500, height: 300}); | ||
}); |