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/blocked_plugin.h" | 5 #include "chrome/renderer/blocked_plugin.h" |
6 | 6 |
7 #include "base/string_piece.h" | 7 #include "base/string_piece.h" |
8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
9 #include "base/values.h" | 9 #include "base/values.h" |
10 #include "chrome/common/jstemplate_builder.h" | 10 #include "chrome/common/jstemplate_builder.h" |
11 #include "chrome/common/render_messages.h" | 11 #include "chrome/common/render_messages.h" |
12 #include "content/common/view_messages.h" | 12 #include "content/common/view_messages.h" |
13 #include "content/renderer/render_view.h" | 13 #include "content/renderer/render_view.h" |
14 #include "grit/generated_resources.h" | 14 #include "grit/generated_resources.h" |
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" | 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h" |
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" | 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h" |
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" | 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" | 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" | 20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebMenuItemInfo.h" |
20 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" | 21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
21 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" | 22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h" |
22 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" | 23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebRegularExpression.
h" |
23 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivit
y.h" | 24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebTextCaseSensitivit
y.h" |
24 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" | 25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h" |
25 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" | 26 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" |
26 #include "ui/base/l10n/l10n_util.h" | 27 #include "ui/base/l10n/l10n_util.h" |
27 #include "ui/base/resource/resource_bundle.h" | 28 #include "ui/base/resource/resource_bundle.h" |
28 #include "webkit/glue/webpreferences.h" | 29 #include "webkit/glue/webpreferences.h" |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
241 element = parent.toConst<WebElement>(); | 242 element = parent.toConst<WebElement>(); |
242 if (element.hasAttribute("style")) { | 243 if (element.hasAttribute("style")) { |
243 WebString style_str = element.getAttribute("style"); | 244 WebString style_str = element.getAttribute("style"); |
244 if (width_regex.match(style_str) >= 0 && | 245 if (width_regex.match(style_str) >= 0 && |
245 height_regex.match(style_str) >= 0) | 246 height_regex.match(style_str) >= 0) |
246 element.setAttribute("style", "display: none;"); | 247 element.setAttribute("style", "display: none;"); |
247 } | 248 } |
248 } | 249 } |
249 } | 250 } |
250 } | 251 } |
OLD | NEW |