[SCM] WebKit Debian packaging branch, webkit-1.1, updated. upstream/1.1.17-1283-gcf603cf
pfeldman at chromium.org
pfeldman at chromium.org
Tue Jan 5 23:47:20 UTC 2010
The following commit has been merged in the webkit-1.1 branch:
commit f54a5c061a32ac4a3e35c7a8f2a490d1b3f20652
Author: pfeldman at chromium.org <pfeldman at chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date: Fri Dec 11 16:52:32 2009 +0000
2009-12-11 Pavel Feldman <pfeldman at chromium.org>
Reviewed by Timothy Hatcher.
Web Inspector: Do not use ContextMenuItem as value type in custom
context menu implementation.
https://bugs.webkit.org/show_bug.cgi?id=32411
* GNUmakefile.am:
* WebCore.gypi:
* WebCore.pro:
* WebCore.vcproj/WebCore.vcproj:
* WebCore.xcodeproj/project.pbxproj:
* bindings/js/JSInspectorFrontendHostCustom.cpp:
(WebCore::JSInspectorFrontendHost::showContextMenu):
* inspector/InspectorFrontendHost.cpp:
(WebCore::InspectorFrontendHost::InspectorFrontendHost):
(WebCore::InspectorFrontendHost::~InspectorFrontendHost):
(WebCore::InspectorFrontendHost::showContextMenu):
(WebCore::InspectorFrontendHost::contextMenuCleared):
* inspector/InspectorFrontendHost.h:
(WebCore::InspectorFrontendHost::MenuProvider::create):
(WebCore::InspectorFrontendHost::MenuProvider::~MenuProvider):
(WebCore::InspectorFrontendHost::MenuProvider::disconnect):
(WebCore::InspectorFrontendHost::MenuProvider::populateContextMenu):
(WebCore::InspectorFrontendHost::MenuProvider::contextMenuCleared):
(WebCore::InspectorFrontendHost::MenuProvider::MenuProvider):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::ContextMenuController):
(WebCore::ContextMenuController::clearContextMenu):
(WebCore::ContextMenuController::showContextMenu):
(WebCore::ContextMenuController::contextMenuItemSelected):
* page/ContextMenuController.h:
* page/ContextMenuProvider.h: Added.
(WebCore::ContextMenuProvider::~ContextMenuProvider):
* page/ContextMenuSelectionHandler.h: Removed.
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@51993 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/WebCore/ChangeLog b/WebCore/ChangeLog
index 6ce077f..0ed7eaa 100644
--- a/WebCore/ChangeLog
+++ b/WebCore/ChangeLog
@@ -1,3 +1,41 @@
+2009-12-11 Pavel Feldman <pfeldman at chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: Do not use ContextMenuItem as value type in custom
+ context menu implementation.
+
+ https://bugs.webkit.org/show_bug.cgi?id=32411
+
+ * GNUmakefile.am:
+ * WebCore.gypi:
+ * WebCore.pro:
+ * WebCore.vcproj/WebCore.vcproj:
+ * WebCore.xcodeproj/project.pbxproj:
+ * bindings/js/JSInspectorFrontendHostCustom.cpp:
+ (WebCore::JSInspectorFrontendHost::showContextMenu):
+ * inspector/InspectorFrontendHost.cpp:
+ (WebCore::InspectorFrontendHost::InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::~InspectorFrontendHost):
+ (WebCore::InspectorFrontendHost::showContextMenu):
+ (WebCore::InspectorFrontendHost::contextMenuCleared):
+ * inspector/InspectorFrontendHost.h:
+ (WebCore::InspectorFrontendHost::MenuProvider::create):
+ (WebCore::InspectorFrontendHost::MenuProvider::~MenuProvider):
+ (WebCore::InspectorFrontendHost::MenuProvider::disconnect):
+ (WebCore::InspectorFrontendHost::MenuProvider::populateContextMenu):
+ (WebCore::InspectorFrontendHost::MenuProvider::contextMenuCleared):
+ (WebCore::InspectorFrontendHost::MenuProvider::MenuProvider):
+ * page/ContextMenuController.cpp:
+ (WebCore::ContextMenuController::ContextMenuController):
+ (WebCore::ContextMenuController::clearContextMenu):
+ (WebCore::ContextMenuController::showContextMenu):
+ (WebCore::ContextMenuController::contextMenuItemSelected):
+ * page/ContextMenuController.h:
+ * page/ContextMenuProvider.h: Added.
+ (WebCore::ContextMenuProvider::~ContextMenuProvider):
+ * page/ContextMenuSelectionHandler.h: Removed.
+
2009-12-11 Simon Hausmann <hausmann at webkit.org>, Kim Grönholm <kim.gronholm at nomovok.com>
Reviewed by Antti Koivisto.
diff --git a/WebCore/GNUmakefile.am b/WebCore/GNUmakefile.am
index f8fa302..b8e6af7 100644
--- a/WebCore/GNUmakefile.am
+++ b/WebCore/GNUmakefile.am
@@ -1318,7 +1318,7 @@ webcore_sources += \
WebCore/page/ContextMenuClient.h \
WebCore/page/ContextMenuController.cpp \
WebCore/page/ContextMenuController.h \
- WebCore/page/ContextMenuSelectionHandler.h \
+ WebCore/page/ContextMenuProvider.h \
WebCore/page/Coordinates.h \
WebCore/page/DOMSelection.cpp \
WebCore/page/DOMSelection.h \
diff --git a/WebCore/WebCore.gypi b/WebCore/WebCore.gypi
index 4a37c79..ab7a376 100644
--- a/WebCore/WebCore.gypi
+++ b/WebCore/WebCore.gypi
@@ -1759,7 +1759,7 @@
'page/ContextMenuClient.h',
'page/ContextMenuController.cpp',
'page/ContextMenuController.h',
- 'page/ContextMenuSelectionHandler.h',
+ 'page/ContextMenuProvider.h',
'page/DOMSelection.cpp',
'page/DOMSelection.h',
'page/DOMTimer.cpp',
diff --git a/WebCore/WebCore.pro b/WebCore/WebCore.pro
index d8fd0b2..4419199 100644
--- a/WebCore/WebCore.pro
+++ b/WebCore/WebCore.pro
@@ -1852,7 +1852,7 @@ HEADERS += \
page/Chrome.h \
page/Console.h \
page/ContextMenuController.h \
- page/ContextMenuSelectionHandler.h \
+ page/ContextMenuProvider.h \
page/Coordinates.h \
page/DOMSelection.h \
page/DOMTimer.h \
diff --git a/WebCore/WebCore.vcproj/WebCore.vcproj b/WebCore/WebCore.vcproj/WebCore.vcproj
index 09945f5..452656a 100644
--- a/WebCore/WebCore.vcproj/WebCore.vcproj
+++ b/WebCore/WebCore.vcproj/WebCore.vcproj
@@ -20527,7 +20527,7 @@
>
</File>
<File
- RelativePath="..\page\ContextMenuSelectionHandler.h"
+ RelativePath="..\page\ContextMenuProvider.h"
>
</File>
<File
diff --git a/WebCore/WebCore.xcodeproj/project.pbxproj b/WebCore/WebCore.xcodeproj/project.pbxproj
index 2d0b804..6e4299c 100644
--- a/WebCore/WebCore.xcodeproj/project.pbxproj
+++ b/WebCore/WebCore.xcodeproj/project.pbxproj
@@ -1251,7 +1251,7 @@
7A74ECBA101839A600BF939E /* InspectorBackend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECB8101839A500BF939E /* InspectorBackend.cpp */; };
7A74ECBB101839A600BF939E /* InspectorBackend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A74ECB9101839A600BF939E /* InspectorBackend.h */; };
7A74ECBD101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */; };
- 7ADE722610CBBB9B006B3B3A /* ContextMenuSelectionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */; };
+ 7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */ = {isa = PBXBuildFile; fileRef = 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */; };
7AED3E050FBB1EAA00D2B03C /* InspectorFrontend.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */; };
7AED3E060FBB1EAA00D2B03C /* InspectorFrontend.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */; };
84224183107E77F400766A87 /* JSSVGFEMorphologyElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */; };
@@ -6591,7 +6591,7 @@
7A74ECB8101839A500BF939E /* InspectorBackend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorBackend.cpp; sourceTree = "<group>"; };
7A74ECB9101839A600BF939E /* InspectorBackend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorBackend.h; sourceTree = "<group>"; };
7A74ECBC101839DA00BF939E /* JSInspectorFrontendHostCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInspectorFrontendHostCustom.cpp; sourceTree = "<group>"; };
- 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuSelectionHandler.h; sourceTree = "<group>"; };
+ 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ContextMenuProvider.h; sourceTree = "<group>"; };
7AED3E030FBB1EAA00D2B03C /* InspectorFrontend.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InspectorFrontend.cpp; sourceTree = "<group>"; };
7AED3E040FBB1EAA00D2B03C /* InspectorFrontend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InspectorFrontend.h; sourceTree = "<group>"; };
84224181107E77F400766A87 /* JSSVGFEMorphologyElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSSVGFEMorphologyElement.cpp; sourceTree = "<group>"; };
@@ -11241,7 +11241,7 @@
065AD4F20B0C2EDA005A2B1D /* ContextMenuClient.h */,
065AD4F30B0C2EDA005A2B1D /* ContextMenuController.cpp */,
065AD4F40B0C2EDA005A2B1D /* ContextMenuController.h */,
- 7ADE722510CBBB9B006B3B3A /* ContextMenuSelectionHandler.h */,
+ 7ADE722510CBBB9B006B3B3A /* ContextMenuProvider.h */,
FE6FD4850F676E5700092873 /* Coordinates.h */,
FE6FD4860F676E5700092873 /* Coordinates.idl */,
BC5A86810C33676000EEA649 /* DOMSelection.cpp */,
@@ -18243,7 +18243,7 @@
7A0E771F10C00DB100A0276E /* JSInspectorFrontendHost.h in Headers */,
F4EAF4AF10C742B1009100D3 /* OpenTypeSanitizer.h in Headers */,
599D1E3310C97D6E00E0EF12 /* jni_utility_private.h in Headers */,
- 7ADE722610CBBB9B006B3B3A /* ContextMenuSelectionHandler.h in Headers */,
+ 7ADE722610CBBB9B006B3B3A /* ContextMenuProvider.h in Headers */,
0C3F1F5B10C8871200D72CE1 /* WebGLUniformLocation.h in Headers */,
0C45342810CDBBFA00869157 /* JSWebGLUniformLocation.h in Headers */,
);
diff --git a/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp b/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
index 1970bf7..ff23e84 100644
--- a/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
+++ b/WebCore/bindings/js/JSInspectorFrontendHostCustom.cpp
@@ -101,17 +101,17 @@ JSValue JSInspectorFrontendHost::showContextMenu(ExecState* execState, const Arg
Event* event = toEvent(args.at(0));
JSArray* array = asArray(args.at(1));
- Vector<ContextMenuItem> items;
+ Vector<ContextMenuItem*> items;
for (size_t i = 0; i < array->length(); ++i) {
JSObject* item = asObject(array->getIndex(i));
JSValue label = item->get(execState, Identifier(execState, "label"));
JSValue id = item->get(execState, Identifier(execState, "id"));
if (label.isUndefined() || id.isUndefined())
- items.append(ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
+ items.append(new ContextMenuItem(SeparatorType, ContextMenuItemTagNoAction, String()));
else {
ContextMenuAction typedId = static_cast<ContextMenuAction>(ContextMenuItemBaseCustomTag + id.toInt32(execState));
- items.append(ContextMenuItem(ActionType, typedId, label.toString(execState)));
+ items.append(new ContextMenuItem(ActionType, typedId, label.toString(execState)));
}
}
diff --git a/WebCore/inspector/InspectorFrontendHost.cpp b/WebCore/inspector/InspectorFrontendHost.cpp
index 2b83942..d067346 100644
--- a/WebCore/inspector/InspectorFrontendHost.cpp
+++ b/WebCore/inspector/InspectorFrontendHost.cpp
@@ -35,7 +35,7 @@
#include "ContextMenu.h"
#include "ContextMenuItem.h"
#include "ContextMenuController.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenuProvider.h"
#include "Element.h"
#include "Frame.h"
#include "FrameLoader.h"
@@ -56,13 +56,13 @@ namespace WebCore {
InspectorFrontendHost::InspectorFrontendHost(InspectorController* inspectorController, InspectorClient* client)
: m_inspectorController(inspectorController)
, m_client(client)
- , m_menuSelectionHandler(MenuSelectionHandler::create(this))
{
}
InspectorFrontendHost::~InspectorFrontendHost()
{
- m_menuSelectionHandler->disconnect();
+ if (m_menuProvider)
+ m_menuProvider->disconnect();
}
void InspectorFrontendHost::loaded()
@@ -208,15 +208,17 @@ void InspectorFrontendHost::setSetting(const String& key, const String& value)
m_inspectorController->setSetting(key, value);
}
-void InspectorFrontendHost::showContextMenu(Event* event, Vector<ContextMenuItem>& items)
+void InspectorFrontendHost::showContextMenu(Event* event, const Vector<ContextMenuItem*>& items)
{
if (!m_inspectorController)
return;
if (!m_inspectorController->windowVisible())
return;
+
+ m_menuProvider = MenuProvider::create(this, items);
ContextMenuController* menuController = m_inspectorController->m_page->contextMenuController();
- menuController->showContextMenu(event, items, m_menuSelectionHandler);
+ menuController->showContextMenu(event, m_menuProvider);
}
void InspectorFrontendHost::contextMenuItemSelected(ContextMenuItem* item)
@@ -229,6 +231,7 @@ void InspectorFrontendHost::contextMenuItemSelected(ContextMenuItem* item)
void InspectorFrontendHost::contextMenuCleared()
{
+ m_menuProvider = 0;
if (m_inspectorController && m_inspectorController->windowVisible())
m_inspectorController->m_frontend->contextMenuCleared();
}
diff --git a/WebCore/inspector/InspectorFrontendHost.h b/WebCore/inspector/InspectorFrontendHost.h
index e0cfa6d..3b6aeb7 100644
--- a/WebCore/inspector/InspectorFrontendHost.h
+++ b/WebCore/inspector/InspectorFrontendHost.h
@@ -30,7 +30,8 @@
#define InspectorFrontendHost_h
#include "Console.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenu.h"
+#include "ContextMenuProvider.h"
#include "InspectorController.h"
#include "PlatformString.h"
@@ -79,21 +80,31 @@ public:
void setSetting(const String& key, const String& value);
// Called from [Custom] implementations.
- void showContextMenu(Event*, Vector<ContextMenuItem>& items);
- void contextMenuItemSelected(ContextMenuItem*);
- void contextMenuCleared();
+ void showContextMenu(Event*, const Vector<ContextMenuItem*>& items);
private:
- class MenuSelectionHandler : public ContextMenuSelectionHandler {
+ class MenuProvider : public ContextMenuProvider {
public:
- static PassRefPtr<MenuSelectionHandler> create(InspectorFrontendHost* frontendHost)
+ static PassRefPtr<MenuProvider> create(InspectorFrontendHost* frontendHost, const Vector<ContextMenuItem*>& items)
+ {
+ return adoptRef(new MenuProvider(frontendHost, items));
+ }
+
+ virtual ~MenuProvider()
{
- return adoptRef(new MenuSelectionHandler(frontendHost));
+ contextMenuCleared();
}
- virtual ~MenuSelectionHandler() { }
+ void disconnect()
+ {
+ m_frontendHost = 0;
+ }
- void disconnect() { m_frontendHost = 0; }
+ virtual void populateContextMenu(ContextMenu* menu)
+ {
+ for (size_t i = 0; i < m_items.size(); ++i)
+ menu->appendItem(*m_items[i]);
+ }
virtual void contextMenuItemSelected(ContextMenuItem* item)
{
@@ -105,19 +116,26 @@ private:
{
if (m_frontendHost)
m_frontendHost->contextMenuCleared();
+ deleteAllValues(m_items);
+ m_items.clear();
}
private:
- MenuSelectionHandler(InspectorFrontendHost* frontendHost)
- : m_frontendHost(frontendHost) { }
+ MenuProvider(InspectorFrontendHost* frontendHost, const Vector<ContextMenuItem*>& items)
+ : m_frontendHost(frontendHost)
+ , m_items(items) { }
InspectorFrontendHost* m_frontendHost;
+ Vector<ContextMenuItem*> m_items;
};
InspectorFrontendHost(InspectorController* inspectorController, InspectorClient* client);
+ void contextMenuItemSelected(ContextMenuItem*);
+ void contextMenuCleared();
+
InspectorController* m_inspectorController;
InspectorClient* m_client;
- RefPtr<MenuSelectionHandler> m_menuSelectionHandler;
+ RefPtr<MenuProvider> m_menuProvider;
};
} // namespace WebCore
diff --git a/WebCore/page/ContextMenuController.cpp b/WebCore/page/ContextMenuController.cpp
index 726dee9..d384b02 100644
--- a/WebCore/page/ContextMenuController.cpp
+++ b/WebCore/page/ContextMenuController.cpp
@@ -31,7 +31,7 @@
#include "Chrome.h"
#include "ContextMenu.h"
#include "ContextMenuClient.h"
-#include "ContextMenuSelectionHandler.h"
+#include "ContextMenuProvider.h"
#include "Document.h"
#include "DocumentFragment.h"
#include "DocumentLoader.h"
@@ -67,7 +67,6 @@ ContextMenuController::ContextMenuController(Page* page, ContextMenuClient* clie
: m_page(page)
, m_client(client)
, m_contextMenu(0)
- , m_selectionHandler(0)
{
ASSERT_ARG(page, page);
ASSERT_ARG(client, client);
@@ -81,9 +80,9 @@ ContextMenuController::~ContextMenuController()
void ContextMenuController::clearContextMenu()
{
m_contextMenu.set(0);
- if (m_selectionHandler)
- m_selectionHandler->contextMenuCleared();
- m_selectionHandler = 0;
+ if (m_menuProvider)
+ m_menuProvider->contextMenuCleared();
+ m_menuProvider = 0;
}
void ContextMenuController::handleContextMenuEvent(Event* event)
@@ -95,19 +94,17 @@ void ContextMenuController::handleContextMenuEvent(Event* event)
showContextMenu(event);
}
-void ContextMenuController::showContextMenu(Event* event, Vector<ContextMenuItem>& items, PassRefPtr<ContextMenuSelectionHandler> selectionHandler)
+void ContextMenuController::showContextMenu(Event* event, PassRefPtr<ContextMenuProvider> menuProvider)
{
- m_selectionHandler = selectionHandler;
+ m_menuProvider = menuProvider;
m_contextMenu.set(createContextMenu(event));
if (!m_contextMenu) {
clearContextMenu();
return;
}
- for (size_t i = 0; i < items.size(); ++i) {
- ContextMenuItem& item = items[i];
- m_contextMenu->appendItem(item);
- }
+
+ m_menuProvider->populateContextMenu(m_contextMenu.get());
showContextMenu(event);
}
@@ -156,8 +153,8 @@ void ContextMenuController::contextMenuItemSelected(ContextMenuItem* item)
}
if (item->action() >= ContextMenuItemBaseCustomTag) {
- ASSERT(m_selectionHandler);
- m_selectionHandler->contextMenuItemSelected(item);
+ ASSERT(m_menuProvider);
+ m_menuProvider->contextMenuItemSelected(item);
return;
}
diff --git a/WebCore/page/ContextMenuController.h b/WebCore/page/ContextMenuController.h
index d51bc70..833b909 100644
--- a/WebCore/page/ContextMenuController.h
+++ b/WebCore/page/ContextMenuController.h
@@ -30,14 +30,13 @@
#include <wtf/OwnPtr.h>
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
-#include <wtf/Vector.h>
namespace WebCore {
class ContextMenu;
class ContextMenuClient;
class ContextMenuItem;
- class ContextMenuSelectionHandler;
+ class ContextMenuProvider;
class Event;
class Page;
@@ -52,7 +51,7 @@ namespace WebCore {
void clearContextMenu();
void handleContextMenuEvent(Event*);
- void showContextMenu(Event*, Vector<ContextMenuItem>&, PassRefPtr<ContextMenuSelectionHandler>);
+ void showContextMenu(Event*, PassRefPtr<ContextMenuProvider>);
void contextMenuItemSelected(ContextMenuItem*);
@@ -63,7 +62,7 @@ namespace WebCore {
Page* m_page;
ContextMenuClient* m_client;
OwnPtr<ContextMenu> m_contextMenu;
- RefPtr<ContextMenuSelectionHandler> m_selectionHandler;
+ RefPtr<ContextMenuProvider> m_menuProvider;
};
}
diff --git a/WebCore/page/ContextMenuProvider.h b/WebCore/page/ContextMenuProvider.h
new file mode 100644
index 0000000..57598d1
--- /dev/null
+++ b/WebCore/page/ContextMenuProvider.h
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2009 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef ContextMenuProvider_h
+#define ContextMenuProvider_h
+
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class ContextMenu;
+class ContextMenuItem;
+
+class ContextMenuProvider : public RefCounted<ContextMenuProvider> {
+public:
+ virtual ~ContextMenuProvider() { };
+
+ virtual void populateContextMenu(ContextMenu*) = 0;
+ virtual void contextMenuItemSelected(ContextMenuItem*) = 0;
+ virtual void contextMenuCleared() = 0;
+};
+
+}
+
+#endif // ContextMenuProvider_h
diff --git a/WebCore/page/ContextMenuSelectionHandler.h b/WebCore/page/ContextMenuSelectionHandler.h
deleted file mode 100644
index d5a6631..0000000
--- a/WebCore/page/ContextMenuSelectionHandler.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2009 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ContextMenuSelectionHandler_h
-#define ContextMenuSelectionHandler_h
-
-#include <wtf/RefCounted.h>
-
-namespace WebCore {
-
- class ContextMenuItem;
-
- class ContextMenuSelectionHandler : public RefCounted<ContextMenuSelectionHandler> {
- public:
- ContextMenuSelectionHandler() { }
- virtual ~ContextMenuSelectionHandler() { };
-
- virtual void contextMenuItemSelected(ContextMenuItem*) = 0;
- virtual void contextMenuCleared() = 0;
- };
-
-}
-
-#endif // ContextMenuSelectionHandler_h
--
WebKit Debian packaging
More information about the Pkg-webkit-commits
mailing list