| OLD | NEW |
| 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 511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 522 | 522 |
| 523 bool ChromeRenderViewObserver::allowMutationEvents(const WebDocument& document, | 523 bool ChromeRenderViewObserver::allowMutationEvents(const WebDocument& document, |
| 524 bool default_value) { | 524 bool default_value) { |
| 525 WebSecurityOrigin origin = document.securityOrigin(); | 525 WebSecurityOrigin origin = document.securityOrigin(); |
| 526 const extensions::Extension* extension = GetExtension(origin); | 526 const extensions::Extension* extension = GetExtension(origin); |
| 527 if (extension && extension->is_platform_app()) | 527 if (extension && extension->is_platform_app()) |
| 528 return false; | 528 return false; |
| 529 return default_value; | 529 return default_value; |
| 530 } | 530 } |
| 531 | 531 |
| 532 bool ChromeRenderViewObserver::allowPushState(const WebDocument& document) { |
| 533 WebSecurityOrigin origin = document.securityOrigin(); |
| 534 const extensions::Extension* extension = GetExtension(origin); |
| 535 return !extension || !extension->is_platform_app(); |
| 536 } |
| 537 |
| 532 static void SendInsecureContentSignal(int signal) { | 538 static void SendInsecureContentSignal(int signal) { |
| 533 UMA_HISTOGRAM_ENUMERATION("SSL.InsecureContent", signal, | 539 UMA_HISTOGRAM_ENUMERATION("SSL.InsecureContent", signal, |
| 534 INSECURE_CONTENT_NUM_EVENTS); | 540 INSECURE_CONTENT_NUM_EVENTS); |
| 535 } | 541 } |
| 536 | 542 |
| 537 bool ChromeRenderViewObserver::allowDisplayingInsecureContent( | 543 bool ChromeRenderViewObserver::allowDisplayingInsecureContent( |
| 538 WebKit::WebFrame* frame, | 544 WebKit::WebFrame* frame, |
| 539 bool allowed_per_settings, | 545 bool allowed_per_settings, |
| 540 const WebKit::WebSecurityOrigin& origin, | 546 const WebKit::WebSecurityOrigin& origin, |
| 541 const WebKit::WebURL& resource_url) { | 547 const WebKit::WebURL& resource_url) { |
| (...skipping 440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 982 reinterpret_cast<const unsigned char*>(&data[0]); | 988 reinterpret_cast<const unsigned char*>(&data[0]); |
| 983 | 989 |
| 984 return decoder.Decode(src_data, data.size()); | 990 return decoder.Decode(src_data, data.size()); |
| 985 } | 991 } |
| 986 return SkBitmap(); | 992 return SkBitmap(); |
| 987 } | 993 } |
| 988 | 994 |
| 989 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 995 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |
| 990 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 996 return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |
| 991 } | 997 } |
| OLD | NEW |