Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 #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 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 363 } | 363 } |
| 364 | 364 |
| 365 void ChromeRenderViewObserver::Navigate(const GURL& url) { | 365 void ChromeRenderViewObserver::Navigate(const GURL& url) { |
| 366 // Execute cache clear operations that were postponed until a navigation | 366 // Execute cache clear operations that were postponed until a navigation |
| 367 // event (including tab reload). | 367 // event (including tab reload). |
| 368 if (chrome_render_process_observer_) | 368 if (chrome_render_process_observer_) |
| 369 chrome_render_process_observer_->ExecutePendingClearCache(); | 369 chrome_render_process_observer_->ExecutePendingClearCache(); |
| 370 AboutHandler::MaybeHandle(url); | 370 AboutHandler::MaybeHandle(url); |
| 371 } | 371 } |
| 372 | 372 |
| 373 void ChromeRenderViewObserver::SetAsInterstitial() { | |
| 374 content_settings_->AllowAllScripts(); | |
|
jochen (gone - plz use gerrit)
2011/12/02 14:42:18
why not also images? I'd go for something more gen
marja
2011/12/02 15:10:33
Done.
| |
| 375 } | |
| 376 | |
| 373 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection( | 377 void ChromeRenderViewObserver::OnSetClientSidePhishingDetection( |
| 374 bool enable_phishing_detection) { | 378 bool enable_phishing_detection) { |
| 375 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS) | 379 #if defined(ENABLE_SAFE_BROWSING) && !defined(OS_CHROMEOS) |
| 376 phishing_classifier_ = enable_phishing_detection ? | 380 phishing_classifier_ = enable_phishing_detection ? |
| 377 safe_browsing::PhishingClassifierDelegate::Create( | 381 safe_browsing::PhishingClassifierDelegate::Create( |
| 378 render_view(), NULL) : | 382 render_view(), NULL) : |
| 379 NULL; | 383 NULL; |
| 380 #endif | 384 #endif |
| 381 } | 385 } |
| 382 | 386 |
| (...skipping 659 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1042 reinterpret_cast<const unsigned char*>(&data[0]); | 1046 reinterpret_cast<const unsigned char*>(&data[0]); |
| 1043 | 1047 |
| 1044 return decoder.Decode(src_data, data.size()); | 1048 return decoder.Decode(src_data, data.size()); |
| 1045 } | 1049 } |
| 1046 return SkBitmap(); | 1050 return SkBitmap(); |
| 1047 } | 1051 } |
| 1048 | 1052 |
| 1049 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 1053 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |
| 1050 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 1054 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |
| 1051 } | 1055 } |
| OLD | NEW |