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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.js

Issue 8565014: NTP4: Remove native focus emulation for bubbles when explictly told to. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 /** 5 /**
6 * @fileoverview New tab page 6 * @fileoverview New tab page
7 * This is the main code for the new tab page used by touch-enabled Chrome 7 * This is the main code for the new tab page used by touch-enabled Chrome
8 * browsers. For now this is still a prototype. 8 * browsers. For now this is still a prototype.
9 */ 9 */
10 10
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 131
132 var dismissButton = loginBubble.querySelector('#login-status-dismiss'); 132 var dismissButton = loginBubble.querySelector('#login-status-dismiss');
133 dismissButton.onclick = loginBubble.hide.bind(loginBubble); 133 dismissButton.onclick = loginBubble.hide.bind(loginBubble);
134 134
135 // The anchor node won't be updated until updateLogin is called so don't 135 // The anchor node won't be updated until updateLogin is called so don't
136 // show the bubble yet. 136 // show the bubble yet.
137 shouldShowLoginBubble = true; 137 shouldShowLoginBubble = true;
138 } else if (localStrings.getString('ntp4_intro_message')) { 138 } else if (localStrings.getString('ntp4_intro_message')) {
139 infoBubble = new cr.ui.Bubble; 139 infoBubble = new cr.ui.Bubble;
140 infoBubble.anchorNode = newTabView.mostVisitedPage.navigationDot; 140 infoBubble.anchorNode = newTabView.mostVisitedPage.navigationDot;
141 infoBubble.captureFocus = false;
141 infoBubble.setArrowLocation(cr.ui.ArrowLocation.BOTTOM_START); 142 infoBubble.setArrowLocation(cr.ui.ArrowLocation.BOTTOM_START);
142 infoBubble.handleCloseEvent = function() { 143 infoBubble.handleCloseEvent = function() {
143 this.hide(); 144 this.hide();
144 chrome.send('introMessageDismissed'); 145 chrome.send('introMessageDismissed');
145 } 146 }
146 147
147 var bubbleContent = $('ntp4-intro-bubble-contents'); 148 var bubbleContent = $('ntp4-intro-bubble-contents');
148 infoBubble.content = bubbleContent; 149 infoBubble.content = bubbleContent;
149 bubbleContent.hidden = false; 150 bubbleContent.hidden = false;
150 151
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 // TODO(estade): update the content handlers to use ntp namespace instead of 454 // TODO(estade): update the content handlers to use ntp namespace instead of
454 // making these global. 455 // making these global.
455 var getAppsCallback = ntp4.getAppsCallback; 456 var getAppsCallback = ntp4.getAppsCallback;
456 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback; 457 var appsPrefChangeCallback = ntp4.appsPrefChangeCallback;
457 var themeChanged = ntp4.themeChanged; 458 var themeChanged = ntp4.themeChanged;
458 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs; 459 var recentlyClosedTabs = ntp4.setRecentlyClosedTabs;
459 var setMostVisitedPages = ntp4.setMostVisitedPages; 460 var setMostVisitedPages = ntp4.setMostVisitedPages;
460 var updateLogin = ntp4.updateLogin; 461 var updateLogin = ntp4.updateLogin;
461 462
462 document.addEventListener('DOMContentLoaded', ntp4.onLoad); 463 document.addEventListener('DOMContentLoaded', ntp4.onLoad);
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/shared/js/cr/ui/bubble.js » ('j') | chrome/browser/resources/shared/js/cr/ui/bubble.js » ('J')

Powered by Google App Engine
This is Rietveld 408576698