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

Unified Diff: chrome/renderer/pepper_plugin_delegate_impl.h

Issue 6253017: Pepper/Flapper: First pass at context menu implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: make brettw happier Created 9 years, 11 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
« no previous file with comments | « chrome/renderer/blocked_plugin.cc ('k') | chrome/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/pepper_plugin_delegate_impl.h
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h
index 408163aed325513b49d327bab59df7dfc95d7d78..f589687ed33c5960e331f1c773da34df9bdeec8f 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.h
+++ b/chrome/renderer/pepper_plugin_delegate_impl.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 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.
@@ -16,11 +16,13 @@
#include "ppapi/c/pp_errors.h"
#include "webkit/plugins/ppapi/plugin_delegate.h"
#include "webkit/plugins/ppapi/ppapi_plugin_instance.h"
+#include "webkit/plugins/ppapi/ppb_flash_menu_impl.h"
class FilePath;
class RenderView;
namespace gfx {
+class Point;
class Rect;
}
@@ -38,6 +40,10 @@ class WebFileChooserCompletion;
struct WebFileChooserParams;
}
+namespace webkit_glue {
+struct CustomContextMenuContext;
+}
+
class TransportDIB;
class PepperPluginDelegateImpl
@@ -154,6 +160,17 @@ class PepperPluginDelegateImpl
base::PlatformFile socket,
const PP_Flash_NetAddress& local_addr,
const PP_Flash_NetAddress& remote_addr);
+ virtual int32_t ShowContextMenu(
+ webkit::ppapi::PPB_Flash_Menu_Impl* menu,
+ const gfx::Point& position);
+ void OnContextMenuClosed(
+ const webkit_glue::CustomContextMenuContext& custom_context);
+ void OnCustomContextMenuAction(
+ const webkit_glue::CustomContextMenuContext& custom_context,
+ unsigned action);
+ void CompleteShowContextMenu(int request_id,
+ bool did_select,
+ unsigned action);
virtual webkit::ppapi::FullscreenContainer*
CreateFullscreenContainer(
webkit::ppapi::PluginInstance* instance);
@@ -171,6 +188,10 @@ class PepperPluginDelegateImpl
std::set<webkit::ppapi::PluginInstance*> active_instances_;
+ // Used to send a single context menu "completion" upon menu close.
+ bool has_saved_context_menu_action_;
+ unsigned saved_context_menu_action_;
+
// TODO(viettrungluu): Get rid of |id_generator_| -- just use |IDMap::Add()|.
// Rename |messages_waiting_replies_| (to specify async open file).
int id_generator_;
@@ -179,6 +200,9 @@ class PepperPluginDelegateImpl
IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_NetConnector_Impl>,
IDMapOwnPointer> pending_connect_tcps_;
+ IDMap<scoped_refptr<webkit::ppapi::PPB_Flash_Menu_Impl>,
+ IDMapOwnPointer> pending_context_menus_;
+
DISALLOW_COPY_AND_ASSIGN(PepperPluginDelegateImpl);
};
« no previous file with comments | « chrome/renderer/blocked_plugin.cc ('k') | chrome/renderer/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698