summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/me2mom/choice.html
blob: bc6a6234beea752d0dd102a456a0cc465e43b46d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<!doctype html>
<!--
Copyright (c) 2011 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>
    <meta charset="utf-8" />
    <link href="http://fonts.googleapis.com/css?family=Droid+Sans&amp;v1"
          rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="chromoting128.png" />
    <link rel="stylesheet" href="debug_log.css" />
    <link rel="stylesheet" href="main.css" />
    <link rel="stylesheet" href="choice.css" />
    <script src="debug_log.js"></script>
    <script src="oauth2.js"></script>
    <script src="plugin_settings.js"></script>
    <script src="remoting.js"></script>
    <title>Chromoting</title>
  </head>

  <body>
    <div id="auth-panel">
      <span id="oauth2-entry">
        <form action="" onsubmit="authorizeOAuth2(); return false;">
          <label for="oauth2-code">OAuth2 Token:</label>
          <input id="oauth2-code" class="display-inline" type="text"
                 oninput="handleOAuth2CodeChange();" />
          <input id="oauth2-submit-button" class="display-inline"
                 type="submit" />
          <input id="oauth2-code-button" class="display-inline" type="button"
                 onclick="remoting.oauth2.openOAuth2Window(); return false;"
                 value="Get OAuth2 Token&hellip;" />
          <input id="oauth2-clear-button" class="display-inline" type="button"
                 onclick="clearOAuth2(); return false;" value="Revoke" />
        </form>
      </span> <!-- oauth2-entry -->

      <span id="email-entry">
        <form action=""
              onsubmit="setEmail(this['new-email'].value); return false;">
          <label for="new-email">Email:</label>
          <span id="current-email" class="display-inline"></span>
          <input id="new-email" class="display-inline" name="new-email"
                 type="text" />
          <input id="email-submit-button" class="display-inline"
                 type="submit" />
          <input id="change-email-button" class="display-inline" type="button"
                 onclick="setEmail(''); return false;" value="Change Email" />
        </form>
      </span> <!-- email-entry -->

      <span id="debug-enable">
        <form>
          <input id="debug-log-toggle" class="display-inline" type="button"
                 value="Debug Log" onclick="toggleDebugLog(); return false;"/>
        </form>
      </span> <!-- debug-enable -->

    </div> <!-- auth-panel -->

    <div id="main-panel" class="hidden">
      <header>
        <img id="icon" src="chromoting128.png">
        <h1 class="icon-label host-element display-inline">
          Chromoting&nbsp;&rsaquo;&nbsp;Share
        </h1>
        <h1 class="icon-label client-element display-inline">
          Chromoting&nbsp;&rsaquo;&nbsp;Connect
        </h1>
        <img id="divider-top" src="dividertop.png">
      </header>

      <section id="host-section" class="host-element">
        <div id="unshared" class="mode">
          <div class="description">
            With Chromoting you can easily let another Chrome user see and
            control your computer.
          </div>
          <div class="centered-button">
            <button id="share-button" class="auth-status-control"
                    type="button" onclick="tryShare(); return false;">
              Share this computer
            </button>
          </div>
        </div> <!-- unshared -->

        <div id="preparing-to-share" class="mode">
          <div class="message">
            Generating access code&hellip;
          </div>
        </div> <!-- preparing-to-share -->

        <div id="ready-to-share" class="mode">
          <div class="description">
            To begin sharing your desktop, read out the access code below to the
            person who will be assisting you.
          </div>
          <div id="access-code-display">
          </div>
          <div class="description">
            Once they enter the code your sharing session will begin.
          </div>
        </div> <!-- ready-to-share -->

        <div id="shared" class="mode">
          <div class="message">
            Your desktop is currently being shared.
          </div>
          <div class="centered-button">
            <button type="button" onclick="cancelShare(); return false;">
              Stop sharing
            </button>
          </div>
        </div> <!-- shared -->

        <div id="share-failed" class="mode">
          <div id="unable-to-get-token" class="message">
            Unable to get access token.
          </div>
          <div class="centered-button">
            <button type="button" class="auth-status-control"
                    onclick="setHostMode('unshared'); return false;">
              OK
            </button>
          </div>
        </div> <!-- share-failed -->
      </section> <!-- host-section -->

      <section id="client-section" class="client-element">
        <div id="unconnected"  class="mode">
          <div class="description">
            Have the user whose computer you wish to access click
            ‘Share this computer’ and then have them read
            their access code to you.
          </div>
          <div id="access-code-entry-row">
            <form action="" onsubmit="tryConnect();  return false;">
              <label class="auth-status-control" for="access-code-entry">
                Access code
              </label>
              <input id="access-code-entry" class="auth-status-control"
                     type="text"/>
              <button id="connect-button" class="auth-status-control"
                      type="submit">
                Connect
              </button>
            </form>
          </div> <!-- code-entry-row -->
        </div> <!-- unconnected -->

        <div id="connecting" class="mode">
          <div class="message">
            Verifying access code...
            <!-- TODO(jamiewalch): Implement Cancel, being careful when ignoring
                 the eventual server response not to ignore responses for any
                 subsequent requests. This should be unified with the host-side
                 Cancel button in the footer.
            -->
          </div>
        </div> <!-- connecting -->

        <div id="connect-failed" class="mode">
          <div id="invalid-access-code" class="message">
            Invalid access code.
          </div>
          <div id="other-connect-error" class="message">
            An error occurred. The server response was
            <div id="server-response"></div>.
          </div>
          <div class="centered-button">
            <button type="button" class="auth-status-control"
                    onclick="setClientMode('unconnected'); return false;">
              OK
            </button>
          </div>
        </div> <!-- connect-failed -->
      </section> <!-- client-section -->

      <footer>
        <img id="divider-bottom" src="dividerbottom.png">
        <div id="client-footer" class="client-element">
          Click here to
          <a class="switch-mode"
             href="#"
             onclick="setGlobalModePersistent(remoting.HOST_MODE);
                      return false;">share this computer</a>
          with another user.
        </div> <!-- client-footer -->

        <div id="host-footer" class="host-element">
          Click here to <a class="switch-mode"
             href="#"
             onclick="setGlobalModePersistent(remoting.CLIENT_MODE);
                      return false;">
            access a shared computer</a>.
        </div> <!-- host-footer -->

        <div id="waiting-footer">
          <img src="spinner.gif">
          <span class="waiting icon-label">waiting for connection&hellip;</span>
          <button id="cancel-button"
                  onclick="cancelPendingOperation();">
            Cancel
          </button>
        </div> <!-- waiting-footer -->
      </footer>
    </div> <!-- main-panel -->

    <div id="loading-panel">
      <em>Loading&hellip;</em>
    </div>

    <div id="plugin-wrapper">
    </div>
    <div id="debug-log">
    </div>
  </body>
</html>