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

Unified Diff: chrome/browser/renderer_host/chrome_render_view_host_observer.cc

Issue 8834008: Hide default context menu for platform apps. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_host/chrome_render_view_host_observer.cc
diff --git a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
index 6ce517d6fa845629f7ea38b6056b13b63b7cbb27..e11ed2fcf48abad136c5d5f634a5c3c942ff6ba6 100644
--- a/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
+++ b/chrome/browser/renderer_host/chrome_render_view_host_observer.cc
@@ -19,6 +19,7 @@
#include "content/browser/renderer_host/render_view_host_delegate.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/site_instance.h"
+#include "content/common/view_messages.h"
#include "content/public/browser/notification_service.h"
ChromeRenderViewHostObserver::ChromeRenderViewHostObserver(
@@ -64,6 +65,13 @@ bool ChromeRenderViewHostObserver::OnMessageReceived(
OnFocusedEditableNodeTouched)
IPC_MESSAGE_UNHANDLED(handled = false)
IPC_END_MESSAGE_MAP()
+
+ if (message.type() == ViewHostMsg_ContextMenu::ID) {
Mihai Parparita -not on Chrome 2011/12/08 03:34:52 Blocking this at the IPC level doesn't seem quite
+ const Extension* extension = GetExtension();
+ if (extension && extension->is_platform_app())
+ handled = true;
+ }
+
return handled;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698