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/content_settings_observer.h" | 5 #include "chrome/renderer/content_settings_observer.h" |
6 | 6 |
7 #include "chrome/common/render_messages.h" | 7 #include "chrome/common/render_messages.h" |
8 #include "chrome/common/ssl_insecure_content.h" | 8 #include "chrome/common/ssl_insecure_content.h" |
9 #include "content/public/common/url_constants.h" | 9 #include "content/public/common/url_constants.h" |
10 #include "content/public/renderer/document_state.h" | 10 #include "content/public/renderer/document_state.h" |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
408 url::Origin(frame->document().getSecurityOrigin()).GetURL()) == | 408 url::Origin(frame->document().getSecurityOrigin()).GetURL()) == |
409 CONTENT_SETTING_ALLOW; | 409 CONTENT_SETTING_ALLOW; |
410 } | 410 } |
411 | 411 |
412 void ContentSettingsObserver::passiveInsecureContentFound( | 412 void ContentSettingsObserver::passiveInsecureContentFound( |
413 const blink::WebURL& resource_url) { | 413 const blink::WebURL& resource_url) { |
414 ReportInsecureContent(SslInsecureContentType::DISPLAY); | 414 ReportInsecureContent(SslInsecureContentType::DISPLAY); |
415 FilteredReportInsecureContentDisplayed(GURL(resource_url)); | 415 FilteredReportInsecureContentDisplayed(GURL(resource_url)); |
416 } | 416 } |
417 | 417 |
418 void ContentSettingsObserver::didUseKeygen() { | |
419 WebFrame* frame = render_frame()->GetWebFrame(); | |
420 Send(new ChromeViewHostMsg_DidUseKeygen( | |
421 routing_id(), url::Origin(frame->getSecurityOrigin()).GetURL())); | |
422 } | |
423 | |
424 void ContentSettingsObserver::didNotAllowPlugins() { | 418 void ContentSettingsObserver::didNotAllowPlugins() { |
425 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); | 419 DidBlockContentType(CONTENT_SETTINGS_TYPE_PLUGINS); |
426 } | 420 } |
427 | 421 |
428 void ContentSettingsObserver::didNotAllowScript() { | 422 void ContentSettingsObserver::didNotAllowScript() { |
429 DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT); | 423 DidBlockContentType(CONTENT_SETTINGS_TYPE_JAVASCRIPT); |
430 } | 424 } |
431 | 425 |
432 void ContentSettingsObserver::OnLoadBlockedPlugins( | 426 void ContentSettingsObserver::OnLoadBlockedPlugins( |
433 const std::string& identifier) { | 427 const std::string& identifier) { |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
535 | 529 |
536 // If the scheme is file:, an empty file name indicates a directory listing, | 530 // If the scheme is file:, an empty file name indicates a directory listing, |
537 // which requires JavaScript to function properly. | 531 // which requires JavaScript to function properly. |
538 if (base::EqualsASCII(protocol, url::kFileScheme)) { | 532 if (base::EqualsASCII(protocol, url::kFileScheme)) { |
539 return document_url.SchemeIs(url::kFileScheme) && | 533 return document_url.SchemeIs(url::kFileScheme) && |
540 document_url.ExtractFileName().empty(); | 534 document_url.ExtractFileName().empty(); |
541 } | 535 } |
542 | 536 |
543 return false; | 537 return false; |
544 } | 538 } |
OLD | NEW |