OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/blocked_plugin.h" | 5 #include "chrome/renderer/blocked_plugin.h" |
6 | 6 |
7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
8 #include "app/resource_bundle.h" | |
9 #include "base/string_piece.h" | 8 #include "base/string_piece.h" |
10 #include "base/string_util.h" | 9 #include "base/string_util.h" |
11 #include "base/values.h" | 10 #include "base/values.h" |
12 #include "chrome/common/jstemplate_builder.h" | 11 #include "chrome/common/jstemplate_builder.h" |
13 #include "chrome/common/render_messages.h" | 12 #include "chrome/common/render_messages.h" |
14 #include "chrome/renderer/render_view.h" | 13 #include "chrome/renderer/render_view.h" |
15 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" |
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivit
y.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivit
y.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
| 25 #include "ui/base/resource/resource_bundle.h" |
26 #include "webkit/glue/webpreferences.h" | 26 #include "webkit/glue/webpreferences.h" |
27 #include "webkit/plugins/npapi/plugin_group.h" | 27 #include "webkit/plugins/npapi/plugin_group.h" |
28 #include "webkit/plugins/npapi/webview_plugin.h" | 28 #include "webkit/plugins/npapi/webview_plugin.h" |
29 | 29 |
30 using WebKit::WebContextMenuData; | 30 using WebKit::WebContextMenuData; |
31 using WebKit::WebElement; | 31 using WebKit::WebElement; |
32 using WebKit::WebFrame; | 32 using WebKit::WebFrame; |
33 using WebKit::WebMenuItemInfo; | 33 using WebKit::WebMenuItemInfo; |
34 using WebKit::WebNode; | 34 using WebKit::WebNode; |
35 using WebKit::WebPlugin; | 35 using WebKit::WebPlugin; |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
215 if (element.hasAttribute("style")) { | 215 if (element.hasAttribute("style")) { |
216 WebString style_str = element.getAttribute("style"); | 216 WebString style_str = element.getAttribute("style"); |
217 if (width_regex.match(style_str) >= 0 && | 217 if (width_regex.match(style_str) >= 0 && |
218 height_regex.match(style_str) >= 0) | 218 height_regex.match(style_str) >= 0) |
219 element.setAttribute("style", "display: none;"); | 219 element.setAttribute("style", "display: none;"); |
220 } | 220 } |
221 } | 221 } |
222 } | 222 } |
223 } | 223 } |
224 | 224 |
OLD | NEW |