diff options
author | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 20:58:15 +0000 |
---|---|---|
committer | jeremy@chromium.org <jeremy@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-06-23 20:58:15 +0000 |
commit | 4b59ae60479a8766e4d0d8a9a8ddd9e32aa84e41 (patch) | |
tree | cbf27b5d434d9f0cd7ccf4e9f69ef7a3c413c67f | |
parent | cc2ae59c5f959e973b0122081a1e54b3921859ef (diff) | |
download | chromium_src-4b59ae60479a8766e4d0d8a9a8ddd9e32aa84e41.zip chromium_src-4b59ae60479a8766e4d0d8a9a8ddd9e32aa84e41.tar.gz chromium_src-4b59ae60479a8766e4d0d8a9a8ddd9e32aa84e41.tar.bz2 |
Some cleanup around WebCore EditCommands:
Renamed CoreCommand -> EditCommand
Renamed the ViewMsg_HandleExecuteEditCommand IPC message to ViewMsg_ExecuteEditCommand
Review URL: http://codereview.chromium.org/147034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19055 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/cocoa/rwhvm_editcommand_helper.h | 2 | ||||
-rw-r--r-- | chrome/browser/renderer_host/render_view_host.cc | 6 | ||||
-rw-r--r-- | chrome/common/render_messages_internal.h | 4 | ||||
-rw-r--r-- | chrome/renderer/render_view.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webframe.h | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.cc | 4 | ||||
-rw-r--r-- | webkit/glue/webframe_impl.h | 4 | ||||
-rw-r--r-- | webkit/tools/test_shell/layout_test_controller.cc | 4 |
8 files changed, 16 insertions, 16 deletions
diff --git a/chrome/browser/cocoa/rwhvm_editcommand_helper.h b/chrome/browser/cocoa/rwhvm_editcommand_helper.h index aa948db..25a8a73 100644 --- a/chrome/browser/cocoa/rwhvm_editcommand_helper.h +++ b/chrome/browser/cocoa/rwhvm_editcommand_helper.h @@ -38,7 +38,7 @@ class RWHVMEditCommandHelper { // Adds editing selectors to the objc class using the objc runtime APIs. // Each selector is connected to a single c method which forwards the message - // to WebCore's ExecuteCoreCommand() function. + // to WebCore's ExecuteEditCommand() function. // This method is idempotent. // The class passed in must conform to the RenderWidgetHostViewMacOwner // protocol. diff --git a/chrome/browser/renderer_host/render_view_host.cc b/chrome/browser/renderer_host/render_view_host.cc index f486cb7..90d0fbc 100644 --- a/chrome/browser/renderer_host/render_view_host.cc +++ b/chrome/browser/renderer_host/render_view_host.cc @@ -1447,9 +1447,9 @@ void RenderViewHost::ForwardMouseEvent( void RenderViewHost::ForwardEditCommand(const std::string& name, const std::string& value) { - IPC::Message* message = new ViewMsg_HandleExecuteEditCommand(routing_id(), - name, - value); + IPC::Message* message = new ViewMsg_ExecuteEditCommand(routing_id(), + name, + value); Send(message); } diff --git a/chrome/common/render_messages_internal.h b/chrome/common/render_messages_internal.h index 7743244..715ede1 100644 --- a/chrome/common/render_messages_internal.h +++ b/chrome/common/render_messages_internal.h @@ -113,8 +113,8 @@ IPC_BEGIN_MESSAGES(View) // Message payload is a blob that should be cast to WebInputEvent IPC_MESSAGE_ROUTED0(ViewMsg_HandleInputEvent) - // Message payload is the name/value of a core command to execute. - IPC_MESSAGE_ROUTED2(ViewMsg_HandleExecuteEditCommand, + // Message payload is the name/value of a WebCore edit command to execute. + IPC_MESSAGE_ROUTED2(ViewMsg_ExecuteEditCommand, std::string, /* name */ std::string /* value */) diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 6376ee7..227bf68 100644 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -354,7 +354,7 @@ void RenderView::OnMessageReceived(const IPC::Message& message) { IPC_MESSAGE_HANDLER(ViewMsg_Delete, OnDelete) IPC_MESSAGE_HANDLER(ViewMsg_SelectAll, OnSelectAll) IPC_MESSAGE_HANDLER(ViewMsg_CopyImageAt, OnCopyImageAt) - IPC_MESSAGE_HANDLER(ViewMsg_HandleExecuteEditCommand, OnExecuteEditCommand) + IPC_MESSAGE_HANDLER(ViewMsg_ExecuteEditCommand, OnExecuteEditCommand) IPC_MESSAGE_HANDLER(ViewMsg_Find, OnFind) IPC_MESSAGE_HANDLER(ViewMsg_Zoom, OnZoom) IPC_MESSAGE_HANDLER(ViewMsg_InsertText, OnInsertText) @@ -723,7 +723,7 @@ void RenderView::OnExecuteEditCommand(const std::string& name, if (!webview() || !webview()->GetFocusedFrame()) return; - webview()->GetFocusedFrame()->ExecuteCoreCommandByName(name, value); + webview()->GetFocusedFrame()->ExecuteEditCommandByName(name, value); } void RenderView::OnInspectElement(int x, int y) { diff --git a/webkit/glue/webframe.h b/webkit/glue/webframe.h index 1789bfb..053c9dc 100644 --- a/webkit/glue/webframe.h +++ b/webkit/glue/webframe.h @@ -368,13 +368,13 @@ class WebFrame { // superset of those accepted by javascript:document.execCommand(). // This method is exposed in order to implement // javascript:layoutTestController.execCommand() - virtual bool ExecuteCoreCommandByName(const std::string& name, + virtual bool ExecuteEditCommandByName(const std::string& name, const std::string& value) = 0; // Checks whether a webkit editor command is currently enabled. This // method is exposed in order to implement // javascript:layoutTestController.isCommandEnabled() - virtual bool IsCoreCommandEnabled(const std::string& name) = 0; + virtual bool IsEditCommandEnabled(const std::string& name) = 0; // Adds a message to the frame's console. virtual void AddMessageToConsole(const WebKit::WebConsoleMessage&) = 0; diff --git a/webkit/glue/webframe_impl.cc b/webkit/glue/webframe_impl.cc index 24d1e4b..475eda8 100644 --- a/webkit/glue/webframe_impl.cc +++ b/webkit/glue/webframe_impl.cc @@ -1764,14 +1764,14 @@ PassRefPtr<Frame> WebFrameImpl::CreateChildFrame( return child_frame.release(); } -bool WebFrameImpl::ExecuteCoreCommandByName(const std::string& name, +bool WebFrameImpl::ExecuteEditCommandByName(const std::string& name, const std::string& value) { ASSERT(frame()); return frame()->editor()->command(webkit_glue::StdStringToString(name)) .execute(webkit_glue::StdStringToString(value)); } -bool WebFrameImpl::IsCoreCommandEnabled(const std::string& name) { +bool WebFrameImpl::IsEditCommandEnabled(const std::string& name) { ASSERT(frame()); return frame()->editor()->command(webkit_glue::StdStringToString(name)) .isEnabled(); diff --git a/webkit/glue/webframe_impl.h b/webkit/glue/webframe_impl.h index 6db3aa0..dfce74a 100644 --- a/webkit/glue/webframe_impl.h +++ b/webkit/glue/webframe_impl.h @@ -166,9 +166,9 @@ class WebFrameImpl : public WebFrame, public base::RefCounted<WebFrameImpl> { virtual WebTextInput* GetTextInput(); - virtual bool ExecuteCoreCommandByName(const std::string& name, + virtual bool ExecuteEditCommandByName(const std::string& name, const std::string& value); - virtual bool IsCoreCommandEnabled(const std::string& name); + virtual bool IsEditCommandEnabled(const std::string& name); virtual void AddMessageToConsole(const WebKit::WebConsoleMessage&); diff --git a/webkit/tools/test_shell/layout_test_controller.cc b/webkit/tools/test_shell/layout_test_controller.cc index fb0c4c0..02797a1 100644 --- a/webkit/tools/test_shell/layout_test_controller.cc +++ b/webkit/tools/test_shell/layout_test_controller.cc @@ -526,7 +526,7 @@ void LayoutTestController::execCommand( value = args[2].ToString(); // Note: webkit's version does not return the boolean, so neither do we. - shell_->webView()->GetFocusedFrame()->ExecuteCoreCommandByName(command, + shell_->webView()->GetFocusedFrame()->ExecuteEditCommandByName(command, value); } result->SetNull(); @@ -540,7 +540,7 @@ void LayoutTestController::isCommandEnabled( } std::string command = args[0].ToString(); - bool rv = shell_->webView()->GetFocusedFrame()->IsCoreCommandEnabled(command); + bool rv = shell_->webView()->GetFocusedFrame()->IsEditCommandEnabled(command); result->Set(rv); } |