Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(167)

Side by Side Diff: chrome/renderer/blocked_plugin.cc

Issue 7631063: Prefix all IPC messages used by src\chrome with Chrome. For e.g ChromeViewMsg_, ChromeViewHostMsg... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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"
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 // We don't swallow ViewMsg_CustomContextMenuAction because we listen for all 146 // We don't swallow ViewMsg_CustomContextMenuAction because we listen for all
147 // custom menu IDs, and not just our own. We don't swallow 147 // custom menu IDs, and not just our own. We don't swallow
148 // ViewMsg_LoadBlockedPlugins because multiple blocked plugins have an 148 // ViewMsg_LoadBlockedPlugins because multiple blocked plugins have an
149 // interest in it. 149 // interest in it.
150 if (message.type() == ViewMsg_CustomContextMenuAction::ID && 150 if (message.type() == ViewMsg_CustomContextMenuAction::ID &&
151 gLastActiveMenu == this) { 151 gLastActiveMenu == this) {
152 ViewMsg_CustomContextMenuAction::Dispatch( 152 ViewMsg_CustomContextMenuAction::Dispatch(
153 &message, this, this, &BlockedPlugin::OnMenuItemSelected); 153 &message, this, this, &BlockedPlugin::OnMenuItemSelected);
154 } else { 154 } else {
155 IPC_BEGIN_MESSAGE_MAP(BlockedPlugin, message) 155 IPC_BEGIN_MESSAGE_MAP(BlockedPlugin, message)
156 IPC_MESSAGE_HANDLER(ViewMsg_LoadBlockedPlugins, OnLoadBlockedPlugins) 156 IPC_MESSAGE_HANDLER(ChromeViewMsg_LoadBlockedPlugins,
157 IPC_MESSAGE_HANDLER(ViewMsg_SetIsPrerendering, OnSetIsPrerendering) 157 OnLoadBlockedPlugins)
158 IPC_MESSAGE_HANDLER(ChromeViewMsg_SetIsPrerendering, OnSetIsPrerendering)
158 IPC_END_MESSAGE_MAP() 159 IPC_END_MESSAGE_MAP()
159 } 160 }
160 161
161 return false; 162 return false;
162 } 163 }
163 164
164 void BlockedPlugin::OnMenuItemSelected( 165 void BlockedPlugin::OnMenuItemSelected(
165 const webkit_glue::CustomContextMenuContext& /* ignored */, 166 const webkit_glue::CustomContextMenuContext& /* ignored */,
166 unsigned id) { 167 unsigned id) {
167 if (id == kMenuActionLoad) { 168 if (id == kMenuActionLoad) {
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 element = parent.toConst<WebElement>(); 265 element = parent.toConst<WebElement>();
265 if (element.hasAttribute("style")) { 266 if (element.hasAttribute("style")) {
266 WebString style_str = element.getAttribute("style"); 267 WebString style_str = element.getAttribute("style");
267 if (width_regex.match(style_str) >= 0 && 268 if (width_regex.match(style_str) >= 0 &&
268 height_regex.match(style_str) >= 0) 269 height_regex.match(style_str) >= 0)
269 element.setAttribute("style", "display: none;"); 270 element.setAttribute("style", "display: none;");
270 } 271 }
271 } 272 }
272 } 273 }
273 } 274 }
OLDNEW
« no previous file with comments | « chrome/renderer/automation/dom_automation_controller.cc ('k') | chrome/renderer/chrome_content_renderer_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698