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

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

Issue 187393005: Make it possible to read CLD data from a file (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Now fully functional and debugged, but we need to package the file. 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
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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 void ChromeRenderViewObserver::OnSetWindowFeatures( 392 void ChromeRenderViewObserver::OnSetWindowFeatures(
393 const WebWindowFeatures& window_features) { 393 const WebWindowFeatures& window_features) {
394 render_view()->GetWebView()->setWindowFeatures(window_features); 394 render_view()->GetWebView()->setWindowFeatures(window_features);
395 } 395 }
396 396
397 void ChromeRenderViewObserver::Navigate(const GURL& url) { 397 void ChromeRenderViewObserver::Navigate(const GURL& url) {
398 // Execute cache clear operations that were postponed until a navigation 398 // Execute cache clear operations that were postponed until a navigation
399 // event (including tab reload). 399 // event (including tab reload).
400 if (chrome_render_process_observer_) 400 if (chrome_render_process_observer_)
401 chrome_render_process_observer_->ExecutePendingClearCache(); 401 chrome_render_process_observer_->ExecutePendingClearCache();
402 // Let translate_helper do any preparatory work for loading a URL.
403 if (translate_helper_)
404 translate_helper_->PrepareForUrl(url);
402 } 405 }
403 406
404 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection( 407 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection(
405 bool enable_phishing_detection) { 408 bool enable_phishing_detection) {
406 #if defined(FULL_SAFE_BROWSING) && !defined(OS_CHROMEOS) 409 #if defined(FULL_SAFE_BROWSING) && !defined(OS_CHROMEOS)
407 phishing_classifier_ = enable_phishing_detection ? 410 phishing_classifier_ = enable_phishing_detection ?
408 safe_browsing::PhishingClassifierDelegate::Create( 411 safe_browsing::PhishingClassifierDelegate::Create(
409 render_view(), NULL) : 412 render_view(), NULL) :
410 NULL; 413 NULL;
411 #endif 414 #endif
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
654 WebElement element = node.to<WebElement>(); 657 WebElement element = node.to<WebElement>();
655 if (!element.hasTagName(tag_name)) 658 if (!element.hasTagName(tag_name))
656 continue; 659 continue;
657 WebString value = element.getAttribute(attribute_name); 660 WebString value = element.getAttribute(attribute_name);
658 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh")) 661 if (value.isNull() || !LowerCaseEqualsASCII(value, "refresh"))
659 continue; 662 continue;
660 return true; 663 return true;
661 } 664 }
662 return false; 665 return false;
663 } 666 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698