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

Side by Side Diff: chrome/renderer/resources/extensions/ad_view.js

Issue 214093002: Replace deprecated webkitCreateShadowRoot with createShadowRoot. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/inject_app_titlebar.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 // Shim that simulates a <adview> tag via Mutation Observers. 5 // Shim that simulates a <adview> tag via Mutation Observers.
6 // 6 //
7 // The actual tag is implemented via the browser plugin. The internals of this 7 // The actual tag is implemented via the browser plugin. The internals of this
8 // are hidden via Shadow DOM. 8 // are hidden via Shadow DOM.
9 9
10 // TODO(rpaquay): This file is currently very similar to "web_view.js". Do we 10 // TODO(rpaquay): This file is currently very similar to "web_view.js". Do we
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 }); 94 });
95 return result; 95 return result;
96 } 96 }
97 97
98 /** 98 /**
99 * @constructor 99 * @constructor
100 */ 100 */
101 function AdView(adviewNode) { 101 function AdView(adviewNode) {
102 this.adviewNode_ = adviewNode; 102 this.adviewNode_ = adviewNode;
103 this.browserPluginNode_ = this.createBrowserPluginNode_(); 103 this.browserPluginNode_ = this.createBrowserPluginNode_();
104 var shadowRoot = this.adviewNode_.webkitCreateShadowRoot(); 104 var shadowRoot = this.adviewNode_.createShadowRoot();
105 shadowRoot.appendChild(this.browserPluginNode_); 105 shadowRoot.appendChild(this.browserPluginNode_);
106 106
107 this.setupCustomAttributes_(); 107 this.setupCustomAttributes_();
108 this.setupAdviewNodeObservers_(); 108 this.setupAdviewNodeObservers_();
109 this.setupAdviewNodeMethods_(); 109 this.setupAdviewNodeMethods_();
110 this.setupAdviewNodeProperties_(); 110 this.setupAdviewNodeProperties_();
111 this.setupAdviewNodeEvents_(); 111 this.setupAdviewNodeEvents_();
112 this.setupBrowserPluginNodeObservers_(); 112 this.setupBrowserPluginNodeObservers_();
113 } 113 }
114 114
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 var evt = new Event(eventname, { bubbles: true }); 386 var evt = new Event(eventname, { bubbles: true });
387 for(var item in detail) { 387 for(var item in detail) {
388 evt[item] = detail[item]; 388 evt[item] = detail[item];
389 } 389 }
390 390
391 // Dispatch event. 391 // Dispatch event.
392 this.adviewNode_.dispatchEvent(evt); 392 this.adviewNode_.dispatchEvent(evt);
393 } 393 }
394 394
395 addTagWatcher('ADVIEW', function(addedNode) { new AdView(addedNode); }); 395 addTagWatcher('ADVIEW', function(addedNode) { new AdView(addedNode); });
OLDNEW
« no previous file with comments | « no previous file | chrome/renderer/resources/extensions/inject_app_titlebar.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698