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

Unified Diff: chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc

Issue 178193005: Move render_view_context_menu.* related files out of tab_contents. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: context_menu->renderer_context_menu for disambiguation Created 6 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc
diff --git a/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc b/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc
deleted file mode 100644
index 1026bd48ac1d5f0d4efcb30e11d5129442783541..0000000000000000000000000000000000000000
--- a/chrome/browser/tab_contents/render_view_context_menu_browsertest_util.cc
+++ /dev/null
@@ -1,48 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/tab_contents/render_view_context_menu_browsertest_util.h"
-
-#include "base/bind.h"
-#include "base/message_loop/message_loop.h"
-#include "chrome/browser/chrome_notification_types.h"
-#include "chrome/browser/tab_contents/render_view_context_menu.h"
-#include "content/public/browser/notification_service.h"
-
-ContextMenuNotificationObserver::ContextMenuNotificationObserver(
- int command_to_execute)
- : command_to_execute_(command_to_execute) {
- registrar_.Add(this,
- chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN,
- content::NotificationService::AllSources());
-}
-
-ContextMenuNotificationObserver::~ContextMenuNotificationObserver() {
-}
-
-void ContextMenuNotificationObserver::Observe(
- int type,
- const content::NotificationSource& source,
- const content::NotificationDetails& details) {
- switch (type) {
- case chrome::NOTIFICATION_RENDER_VIEW_CONTEXT_MENU_SHOWN: {
- RenderViewContextMenu* context_menu =
- content::Source<RenderViewContextMenu>(source).ptr();
- base::MessageLoop::current()->PostTask(
- FROM_HERE,
- base::Bind(&ContextMenuNotificationObserver::ExecuteCommand,
- base::Unretained(this), context_menu));
- break;
- }
-
- default:
- NOTREACHED();
- }
-}
-
-void ContextMenuNotificationObserver::ExecuteCommand(
- RenderViewContextMenu* context_menu) {
- context_menu->ExecuteCommand(command_to_execute_, 0);
- context_menu->Cancel();
-}

Powered by Google App Engine
This is Rietveld 408576698