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

Side by Side Diff: chrome/common/extensions/docs/templates/intros/networking_config.html

Issue 1006913004: Add screenshots to networking.config documentation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « chrome/common/extensions/docs/static/images/networking_config_notification.png ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <h2 id="usage">Implementing a Captive Portal Authenticator</h2> 1 <h2 id="usage">Implementing a Captive Portal Authenticator</h2>
2 This API allows an Extension to implement an authenticator for captive portals. 2 This API allows an Extension to implement an authenticator for captive portals.
3 The interaction between Extension, Chrome, and the user will be: 3 The interaction between Extension, Chrome, and the user will be:
4 <ol> 4 <ol>
5 <li>Using $(ref:setNetworkFilter), the Extension registers for a list of Wi-Fi 5 <li>Using $(ref:setNetworkFilter), the Extension registers for a list of Wi-Fi
6 networks that it wants to handle captive portals on.</li> 6 networks that it wants to handle captive portals on.</li>
7 <li>If one of these networks is detected by Chrome, it will appear in the 7 <li>If one of these networks is detected by Chrome, it will appear in the
8 network list, badged with an icon to indicate that a captive portal handler is 8 network list, badged with an icon to indicate that a captive portal handler is
9 available.</li> 9 available.
10 <p>
11 <img src="{{static}}/images/networking_config_badge.png"
12 align="middle" width="301" height="305" alt="Badge icon in tray network lis t" />
13 </li>
10 <li>If the user selects such a network, but a captive portal is not detected, 14 <li>If the user selects such a network, but a captive portal is not detected,
11 Chrome will connect as usual - the Extension will never be involved.</li> 15 Chrome will connect as usual - the Extension will never be involved.</li>
12 <li>Otherwise, if a captive portal is detected, the user is notified and asked 16 <li>Otherwise, if a captive portal is detected, the user is notified and asked
13 to authenticate using the registered Extension or whether to visit the captive 17 to authenticate using the registered Extension or whether to visit the captive
14 portal page.</li> 18 portal page.
19 <p>
20 <img src="{{static}}/images/networking_config_notification.png"
21 align="middle" width="367" height="224" alt="Captive portal notification" / >
22 </li>
15 <li>If the user selects the Extension, Chrome notifies the Extension through 23 <li>If the user selects the Extension, Chrome notifies the Extension through
16 the $(ref:onCaptivePortalDetected) event.</li> 24 the $(ref:onCaptivePortalDetected) event.</li>
17 <li>The Extension should now interact with the user if necessary and 25 <li>The Extension should now interact with the user if necessary and
18 authenticate at the captive portal.</li> 26 authenticate at the captive portal.</li>
19 <li>Once the Extension finished the authentication, it notifies the API using 27 <li>Once the Extension finished the authentication, it notifies the API using
20 $(ref:finishAuthentication) about its success or failure.</li> 28 $(ref:finishAuthentication) about its success or failure.</li>
21 </ol> 29 </ol>
22 30
23 <p> 31 <p>
24 In the Extension, this can look similar to the following snippet: 32 In the Extension, this can look similar to the following snippet:
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 function continueAuthentication(guid, credentials) { 74 function continueAuthentication(guid, credentials) {
67 if (!credentials) { 75 if (!credentials) {
68 chrome.networking.config.finishAuthentication(guid, 'failed'); 76 chrome.networking.config.finishAuthentication(guid, 'failed');
69 } 77 }
70 AuthenticateToMyCaptivePortalServer(credentials, function(success) { 78 AuthenticateToMyCaptivePortalServer(credentials, function(success) {
71 chrome.networking.config.finishAuthentication( 79 chrome.networking.config.finishAuthentication(
72 guid, success ? 'succeeded' : 'rejected'); 80 guid, success ? 'succeeded' : 'rejected');
73 }); 81 });
74 } 82 }
75 </pre> 83 </pre>
OLDNEW
« no previous file with comments | « chrome/common/extensions/docs/static/images/networking_config_notification.png ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698