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

Side by Side Diff: chrome/renderer/chrome_render_view_observer.cc

Issue 9185026: Convert use of int ms to TimeDelta in files owned by brettw. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Explicitly include base/time.h in header file. Created 8 years, 11 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
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 "chrome/renderer/chrome_render_view_observer.h" 5 #include "chrome/renderer/chrome_render_view_observer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 webui_javascript_->notify_result); 658 webui_javascript_->notify_result);
659 webui_javascript_.reset(); 659 webui_javascript_.reset();
660 } 660 }
661 } 661 }
662 662
663 void ChromeRenderViewObserver::DidStopLoading() { 663 void ChromeRenderViewObserver::DidStopLoading() {
664 MessageLoop::current()->PostDelayedTask( 664 MessageLoop::current()->PostDelayedTask(
665 FROM_HERE, 665 FROM_HERE,
666 base::Bind(&ChromeRenderViewObserver::CapturePageInfo, 666 base::Bind(&ChromeRenderViewObserver::CapturePageInfo,
667 weak_factory_.GetWeakPtr(), render_view()->GetPageId(), false), 667 weak_factory_.GetWeakPtr(), render_view()->GetPageId(), false),
668 render_view()->GetContentStateImmediately() ? 0 : kDelayForCaptureMs); 668 base::TimeDelta::FromMilliseconds(
669 render_view()->GetContentStateImmediately() ?
670 0 : kDelayForCaptureMs));
669 671
670 WebFrame* main_frame = render_view()->GetWebView()->mainFrame(); 672 WebFrame* main_frame = render_view()->GetWebView()->mainFrame();
671 GURL osd_url = main_frame->document().openSearchDescriptionURL(); 673 GURL osd_url = main_frame->document().openSearchDescriptionURL();
672 if (!osd_url.is_empty()) { 674 if (!osd_url.is_empty()) {
673 Send(new ChromeViewHostMsg_PageHasOSDD( 675 Send(new ChromeViewHostMsg_PageHasOSDD(
674 routing_id(), render_view()->GetPageId(), osd_url, 676 routing_id(), render_view()->GetPageId(), osd_url,
675 search_provider::AUTODETECTED_PROVIDER)); 677 search_provider::AUTODETECTED_PROVIDER));
676 } 678 }
677 679
678 int icon_types = WebIconURL::TypeFavicon; 680 int icon_types = WebIconURL::TypeFavicon;
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 716
715 void ChromeRenderViewObserver::DidCommitProvisionalLoad( 717 void ChromeRenderViewObserver::DidCommitProvisionalLoad(
716 WebFrame* frame, bool is_new_navigation) { 718 WebFrame* frame, bool is_new_navigation) {
717 if (!is_new_navigation) 719 if (!is_new_navigation)
718 return; 720 return;
719 721
720 MessageLoop::current()->PostDelayedTask( 722 MessageLoop::current()->PostDelayedTask(
721 FROM_HERE, 723 FROM_HERE,
722 base::Bind(&ChromeRenderViewObserver::CapturePageInfo, 724 base::Bind(&ChromeRenderViewObserver::CapturePageInfo,
723 weak_factory_.GetWeakPtr(), render_view()->GetPageId(), true), 725 weak_factory_.GetWeakPtr(), render_view()->GetPageId(), true),
724 kDelayForForcedCaptureMs); 726 base::TimeDelta::FromMilliseconds(kDelayForForcedCaptureMs));
725 } 727 }
726 728
727 void ChromeRenderViewObserver::DidClearWindowObject(WebFrame* frame) { 729 void ChromeRenderViewObserver::DidClearWindowObject(WebFrame* frame) {
728 if (render_view()->GetEnabledBindings() & 730 if (render_view()->GetEnabledBindings() &
729 content::BINDINGS_POLICY_DOM_AUTOMATION) { 731 content::BINDINGS_POLICY_DOM_AUTOMATION) {
730 BindDOMAutomationController(frame); 732 BindDOMAutomationController(frame);
731 } 733 }
732 734
733 if (render_view()->GetEnabledBindings() & 735 if (render_view()->GetEnabledBindings() &
734 content::BINDINGS_POLICY_EXTERNAL_HOST) { 736 content::BINDINGS_POLICY_EXTERNAL_HOST) {
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
1075 reinterpret_cast<const unsigned char*>(&data[0]); 1077 reinterpret_cast<const unsigned char*>(&data[0]);
1076 1078
1077 return decoder.Decode(src_data, data.size()); 1079 return decoder.Decode(src_data, data.size());
1078 } 1080 }
1079 return SkBitmap(); 1081 return SkBitmap();
1080 } 1082 }
1081 1083
1082 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { 1084 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) {
1083 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); 1085 return (strict_security_hosts_.find(host) != strict_security_hosts_.end());
1084 } 1086 }
OLDNEW
« no previous file with comments | « chrome/renderer/chrome_render_process_observer.cc ('k') | chrome/renderer/extensions/user_script_idle_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698