Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(131)

Side by Side Diff: chrome_frame/host_w_controls.html

Issue 218019: Initial import of the Chrome Frame codebase. Integration in chrome.gyp coming... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome_frame/host.html ('k') | chrome_frame/html_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <HTML>
2 <!-- TODO(slightlyoff): Move to tests directory? -->
3 <HEAD>
4 <TITLE> Chrome Frame Test </TITLE>
5 <SCRIPT type="text/javascript">
6 function msg(txt) {
7 try {
8 document.getElementById("my_text").innerHTML = txt;
9 } catch(e) {
10 alert("error");
11 }
12 }
13
14 function GetChromeFrame() {
15 var chromeFrame = window.document.ChromeFrame
16 return chromeFrame;
17 }
18
19 function OnChromeFrameMessage(text) {
20 msg("In host: \r\nMessage from ChromeFrame: " + text);
21
22 var chromeFrame = GetChromeFrame();
23 chromeFrame.PostMessageToFrame("OnHostMessage", "Hello from host");
24 return "OK";
25 }
26
27 function OnNavigate() {
28 var url = document.getElementById('inputurl');
29 GetChromeFrame().src = url.value;
30 }
31
32 function OnFocus() {
33 msg("OnFocus");
34 }
35
36 window.onload = function() {
37 var chromeFrame = GetChromeFrame();
38 var url = location.href;
39 url = url.substr(0, url.lastIndexOf('/') + 1) + "frame_w_controls.html";
40 chromeFrame.src = url;
41
42 try {
43 var cf = document.getElementById('ChromeFrame');
44 cf.addEventListener("focus", OnFocus, true);
45 cf.addEventListener("blur", function() { msg('blur'); }, true);
46 msg("ready");
47 } catch(e) {
48 alert("error");
49 }
50 }
51
52 function setFocusToCf() {
53 var cf = document.getElementById('ChromeFrame');
54 cf.focus();
55 // alert(cf.hasFocus());
56 return true;
57 }
58
59 </SCRIPT>
60 <style>
61 /* CSS magic to avoid the focus rect */
62 object:focus {
63 outline: 0;
64 }
65 </style>
66 <!--
67 object:focus { outline: none; }
68 :focus { outline: none }
69 a:focus { outline: 1px dotted invert }
70 -->
71 </HEAD>
72 <BODY>
73 Chrome Frame Test activex
74 <br><br>
75 <input id="inputurl" type="text" name="URL">
76 <input type="submit" value="Navigate" onClick="OnNavigate();">
77 <center>
78 <OBJECT ID="ChromeFrame" tabindex="0"
79 WIDTH="500"
80 HEIGHT="300"
81 CODEBASE="http://www.google.com"
82 CLASSID="CLSID:E0A900DF-9611-4446-86BD-4B1D47E7DB2A">
83 <!-- <PARAM NAME="BackColor" VALUE="100"> -->
84 <!-- <PARAM NAME="src" VALUE="file:///z:/code/debug/test.html"> -->
85 <embed ID="ChromeFramePlugin" WIDTH=500 HEIGHT=300 NAME="ChromeFrame"
86 SRC="http://www.google.com" TYPE="application/chromeframe">
87 </embed>
88 </OBJECT>
89 <p>To test the focus: <input id="fake_edit" type="text" name="fake"></p>
90 <p><button onclick="return setFocusToCf();">SetFocusToCF</button></p>
91 <p>
92 Message:<br>
93 <pre><p id="my_text"></p></pre>
94 </p>
95 </center>
96 </BODY>
97 </HTML>
OLDNEW
« no previous file with comments | « chrome_frame/host.html ('k') | chrome_frame/html_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698