| 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 446 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   457                                                   enabled_per_settings, |   457                                                   enabled_per_settings, | 
|   458                                                   script_url); |   458                                                   script_url); | 
|   459 } |   459 } | 
|   460  |   460  | 
|   461 bool ChromeRenderViewObserver::allowScriptExtension( |   461 bool ChromeRenderViewObserver::allowScriptExtension( | 
|   462     WebFrame* frame, const WebString& extension_name, int extension_group) { |   462     WebFrame* frame, const WebString& extension_name, int extension_group) { | 
|   463   return extension_dispatcher_->AllowScriptExtension( |   463   return extension_dispatcher_->AllowScriptExtension( | 
|   464       frame, extension_name.utf8(), extension_group); |   464       frame, extension_name.utf8(), extension_group); | 
|   465 } |   465 } | 
|   466  |   466  | 
 |   467 bool ChromeRenderViewObserver::allowScriptExtension( | 
 |   468     WebFrame* frame, const WebString& extension_name, int extension_group, | 
 |   469     int world_id) { | 
 |   470   return extension_dispatcher_->AllowScriptExtension( | 
 |   471       frame, extension_name.utf8(), extension_group, world_id); | 
 |   472 } | 
 |   473  | 
|   467 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { |   474 bool ChromeRenderViewObserver::allowStorage(WebFrame* frame, bool local) { | 
|   468   return content_settings_->AllowStorage(frame, local); |   475   return content_settings_->AllowStorage(frame, local); | 
|   469 } |   476 } | 
|   470  |   477  | 
|   471 bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, |   478 bool ChromeRenderViewObserver::allowReadFromClipboard(WebFrame* frame, | 
|   472                                                      bool default_value) { |   479                                                      bool default_value) { | 
|   473   bool allowed = false; |   480   bool allowed = false; | 
|   474   // TODO(dcheng): Should we consider a toURL() method on WebSecurityOrigin? |   481   // TODO(dcheng): Should we consider a toURL() method on WebSecurityOrigin? | 
|   475   Send(new ChromeViewHostMsg_CanTriggerClipboardRead( |   482   Send(new ChromeViewHostMsg_CanTriggerClipboardRead( | 
|   476       routing_id(), GURL(frame->document().securityOrigin().toString().utf8()), |   483       routing_id(), GURL(frame->document().securityOrigin().toString().utf8()), | 
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1066         reinterpret_cast<const unsigned char*>(&data[0]); |  1073         reinterpret_cast<const unsigned char*>(&data[0]); | 
|  1067  |  1074  | 
|  1068     return decoder.Decode(src_data, data.size()); |  1075     return decoder.Decode(src_data, data.size()); | 
|  1069   } |  1076   } | 
|  1070   return SkBitmap(); |  1077   return SkBitmap(); | 
|  1071 } |  1078 } | 
|  1072  |  1079  | 
|  1073 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { |  1080 bool ChromeRenderViewObserver::IsStrictSecurityHost(const std::string& host) { | 
|  1074   return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); |  1081   return (strict_security_hosts_.find(host) != strict_security_hosts_.end()); | 
|  1075 } |  1082 } | 
| OLD | NEW |