summaryrefslogtreecommitdiffstats
path: root/webkit/glue/context_menu_client_impl.cc
diff options
context:
space:
mode:
authordarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-05 04:20:31 +0000
committerdarin@chromium.org <darin@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-05 04:20:31 +0000
commit5ae8ce17da13ea2755858d834c4e7e890534a069 (patch)
treed9930f99f8a6a182e673212df599501aba3b2ccb /webkit/glue/context_menu_client_impl.cc
parentffa2b24e61f3d5bb0696014b2f0acb1399bd31cc (diff)
downloadchromium_src-5ae8ce17da13ea2755858d834c4e7e890534a069.zip
chromium_src-5ae8ce17da13ea2755858d834c4e7e890534a069.tar.gz
chromium_src-5ae8ce17da13ea2755858d834c4e7e890534a069.tar.bz2
Some cleanup to various WebCore client implementations.
Replaced usage of MessageLoop in EditorClientImpl with WebCore::Timer. Changed the clients to be instance variables of WebViewImpl instead of being separately heap allocated. This cleaned up some of the lifetime issues. R=dglazkov Review URL: http://codereview.chromium.org/198030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25573 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/context_menu_client_impl.cc')
-rw-r--r--webkit/glue/context_menu_client_impl.cc23
1 files changed, 5 insertions, 18 deletions
diff --git a/webkit/glue/context_menu_client_impl.cc b/webkit/glue/context_menu_client_impl.cc
index c3c6ff2..3a36fc5c 100644
--- a/webkit/glue/context_menu_client_impl.cc
+++ b/webkit/glue/context_menu_client_impl.cc
@@ -4,9 +4,6 @@
#include "config.h"
-#include "base/compiler_specific.h"
-
-MSVC_PUSH_WARNING_LEVEL(0);
#include "ContextMenu.h"
#include "Document.h"
#include "DocumentLoader.h"
@@ -20,21 +17,18 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "KURL.h"
#include "MediaError.h"
#include "Widget.h"
-MSVC_POP_WARNING();
#undef LOG
-#include "webkit/glue/context_menu_client_impl.h"
-
#include "base/string_util.h"
+#include "base/word_iterator.h"
#include "webkit/api/public/WebURL.h"
#include "webkit/api/public/WebURLResponse.h"
#include "webkit/api/src/WebDataSourceImpl.h"
#include "webkit/glue/context_menu.h"
+#include "webkit/glue/context_menu_client_impl.h"
#include "webkit/glue/glue_util.h"
#include "webkit/glue/webview_impl.h"
-#include "base/word_iterator.h"
-
using WebKit::WebDataSource;
using WebKit::WebDataSourceImpl;
@@ -79,8 +73,7 @@ std::wstring GetMisspelledWord(const WebCore::ContextMenu* default_menu,
// Don't provide suggestions for multiple words.
if (!IsASingleWord(misspelled_word_string))
return L"";
- else
- return misspelled_word_string;
+ return misspelled_word_string;
}
WebCore::HitTestResult hit_test_result = selected_frame->eventHandler()->
@@ -122,7 +115,7 @@ ContextMenuClientImpl::~ContextMenuClientImpl() {
}
void ContextMenuClientImpl::contextMenuDestroyed() {
- delete this;
+ // Our lifetime is bound to the WebViewImpl.
}
// Figure out the URL of a page or subframe. Returns |page_type| as the type,
@@ -328,11 +321,5 @@ void ContextMenuClientImpl::stopSpeaking() {
}
bool ContextMenuClientImpl::shouldIncludeInspectElementItem() {
- return false; // TODO(jackson): Eventually include the inspector context menu item
-}
-
-#if defined(OS_MACOSX)
-void ContextMenuClientImpl::searchWithSpotlight() {
- // TODO(pinkerton): write this
+ return false;
}
-#endif