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

Side by Side Diff: trunk/src/content/renderer/render_view_impl.cc

Issue 190953007: Revert 255928 "Only notify V8 once per timezone change" (Closed) Base URL: svn://svn.chromium.org/chrome/
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 | « trunk/src/content/renderer/render_view_impl.h ('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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 372
373 // static 373 // static
374 Referrer RenderViewImpl::GetReferrerFromRequest( 374 Referrer RenderViewImpl::GetReferrerFromRequest(
375 WebFrame* frame, 375 WebFrame* frame,
376 const WebURLRequest& request) { 376 const WebURLRequest& request) {
377 return Referrer(GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))), 377 return Referrer(GURL(request.httpHeaderField(WebString::fromUTF8("Referer"))),
378 request.referrerPolicy()); 378 request.referrerPolicy());
379 } 379 }
380 380
381 // static 381 // static
382 void RenderViewImpl::NotifyTimezoneChange() { 382 void RenderViewImpl::NotifyTimezoneChange(blink::WebFrame* frame) {
383 v8::HandleScope handle_scope(v8::Isolate::GetCurrent());
384 v8::Context::Scope context_scope(frame->mainWorldScriptContext());
383 v8::Date::DateTimeConfigurationChangeNotification(v8::Isolate::GetCurrent()); 385 v8::Date::DateTimeConfigurationChangeNotification(v8::Isolate::GetCurrent());
386 blink::WebFrame* child = frame->firstChild();
387 for (; child; child = child->nextSibling())
388 NotifyTimezoneChange(child);
384 } 389 }
385 390
386 // static 391 // static
387 WindowOpenDisposition RenderViewImpl::NavigationPolicyToDisposition( 392 WindowOpenDisposition RenderViewImpl::NavigationPolicyToDisposition(
388 WebNavigationPolicy policy) { 393 WebNavigationPolicy policy) {
389 switch (policy) { 394 switch (policy) {
390 case blink::WebNavigationPolicyIgnore: 395 case blink::WebNavigationPolicyIgnore:
391 return IGNORE_ACTION; 396 return IGNORE_ACTION;
392 case blink::WebNavigationPolicyDownload: 397 case blink::WebNavigationPolicyDownload:
393 return SAVE_TO_DISK; 398 return SAVE_TO_DISK;
(...skipping 3372 matching lines...) Expand 10 before | Expand all | Expand 10 after
3766 void RenderViewImpl::OnDragSourceSystemDragEnded() { 3771 void RenderViewImpl::OnDragSourceSystemDragEnded() {
3767 webview()->dragSourceSystemDragEnded(); 3772 webview()->dragSourceSystemDragEnded();
3768 } 3773 }
3769 3774
3770 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) { 3775 void RenderViewImpl::OnUpdateWebPreferences(const WebPreferences& prefs) {
3771 webkit_preferences_ = prefs; 3776 webkit_preferences_ = prefs;
3772 ApplyWebPreferences(webkit_preferences_, webview()); 3777 ApplyWebPreferences(webkit_preferences_, webview());
3773 } 3778 }
3774 3779
3775 void RenderViewImpl::OnUpdateTimezone() { 3780 void RenderViewImpl::OnUpdateTimezone() {
3776 NotifyTimezoneChange(); 3781 if (webview())
3782 NotifyTimezoneChange(webview()->mainFrame());
3777 } 3783 }
3778 3784
3779 void RenderViewImpl::OnEnumerateDirectoryResponse( 3785 void RenderViewImpl::OnEnumerateDirectoryResponse(
3780 int id, 3786 int id,
3781 const std::vector<base::FilePath>& paths) { 3787 const std::vector<base::FilePath>& paths) {
3782 if (!enumeration_completions_[id]) 3788 if (!enumeration_completions_[id])
3783 return; 3789 return;
3784 3790
3785 WebVector<WebString> ws_file_names(paths.size()); 3791 WebVector<WebString> ws_file_names(paths.size());
3786 for (size_t i = 0; i < paths.size(); ++i) 3792 for (size_t i = 0; i < paths.size(); ++i)
(...skipping 1364 matching lines...) Expand 10 before | Expand all | Expand 10 after
5151 for (size_t i = 0; i < icon_urls.size(); i++) { 5157 for (size_t i = 0; i < icon_urls.size(); i++) {
5152 WebURL url = icon_urls[i].iconURL(); 5158 WebURL url = icon_urls[i].iconURL();
5153 if (!url.isEmpty()) 5159 if (!url.isEmpty())
5154 urls.push_back(FaviconURL(url, 5160 urls.push_back(FaviconURL(url,
5155 ToFaviconType(icon_urls[i].iconType()))); 5161 ToFaviconType(icon_urls[i].iconType())));
5156 } 5162 }
5157 SendUpdateFaviconURL(urls); 5163 SendUpdateFaviconURL(urls);
5158 } 5164 }
5159 5165
5160 } // namespace content 5166 } // namespace content
OLDNEW
« no previous file with comments | « trunk/src/content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698