diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-03 03:54:22 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-03 03:54:22 +0000 |
commit | ec902ed33ba8247309d159a3d52902c82acccaf5 (patch) | |
tree | 2bb09254b9dd347a9f61a79d1940c77c50ce78ca /content | |
parent | cc643fd82eceeae19797daa0e09bb8b9bde54c81 (diff) | |
download | chromium_src-ec902ed33ba8247309d159a3d52902c82acccaf5.zip chromium_src-ec902ed33ba8247309d159a3d52902c82acccaf5.tar.gz chromium_src-ec902ed33ba8247309d159a3d52902c82acccaf5.tar.bz2 |
Get rid of the command state changed code that was only used for spellchecking on mac. I made RenderWidgetHostViewMac filter the message itself.
Review URL: http://codereview.chromium.org/6889008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@83850 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/DEPS | 2 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.cc | 40 | ||||
-rw-r--r-- | content/browser/renderer_host/render_view_host.h | 13 |
3 files changed, 0 insertions, 55 deletions
diff --git a/content/browser/DEPS b/content/browser/DEPS index 606bf05..5a7dec8 100644 --- a/content/browser/DEPS +++ b/content/browser/DEPS @@ -132,8 +132,6 @@ include_rules = [ "+chrome/common/net/url_fetcher.h",
- "+chrome/common/render_view_commands.h",
-
"+chrome/common/sandbox_policy.h",
"+chrome/common/security_style.h",
diff --git a/content/browser/renderer_host/render_view_host.cc b/content/browser/renderer_host/render_view_host.cc index da09850..216cedb 100644 --- a/content/browser/renderer_host/render_view_host.cc +++ b/content/browser/renderer_host/render_view_host.cc @@ -358,22 +358,6 @@ int RenderViewHost::GetPendingRequestId() { return pending_request_id_; } -RenderViewHost::CommandState RenderViewHost::GetStateForCommand( - RenderViewCommand command) const { - if (command != RENDER_VIEW_COMMAND_TOGGLE_SPELL_CHECK) - LOG(DFATAL) << "Unknown command " << command; - - std::map<RenderViewCommand, CommandState>::const_iterator it = - command_states_.find(command); - if (it == command_states_.end()) { - CommandState state; - state.is_enabled = false; - state.checked_state = RENDER_VIEW_COMMAND_CHECKED_STATE_UNCHECKED; - return state; - } - return it->second; -} - void RenderViewHost::Stop() { Send(new ViewMsg_Stop(routing_id())); } @@ -757,8 +741,6 @@ bool RenderViewHost::OnMessageReceived(const IPC::Message& msg) { #if defined(OS_MACOSX) IPC_MESSAGE_HANDLER(ViewHostMsg_ShowPopup, OnMsgShowPopup) #endif - IPC_MESSAGE_HANDLER(ViewHostMsg_CommandStateChanged, - OnCommandStateChanged) // Have the super handle all other messages. IPC_MESSAGE_UNHANDLED(handled = RenderWidgetHost::OnMessageReceived(msg)) IPC_END_MESSAGE_MAP_EX() @@ -1440,25 +1422,3 @@ void RenderViewHost::OnMsgShowPopup( } } #endif - -void RenderViewHost::OnCommandStateChanged(int command, - bool is_enabled, - int checked_state) { - if (command != RENDER_VIEW_COMMAND_TOGGLE_SPELL_CHECK) { - LOG(DFATAL) << "Unknown command " << command; - return; - } - - if (checked_state != RENDER_VIEW_COMMAND_CHECKED_STATE_UNCHECKED && - checked_state != RENDER_VIEW_COMMAND_CHECKED_STATE_CHECKED && - checked_state != RENDER_VIEW_COMMAND_CHECKED_STATE_MIXED) { - LOG(DFATAL) << "Invalid checked state " << checked_state; - return; - } - - CommandState state; - state.is_enabled = is_enabled; - state.checked_state = - static_cast<RenderViewCommandCheckedState>(checked_state); - command_states_[static_cast<RenderViewCommand>(command)] = state; -} diff --git a/content/browser/renderer_host/render_view_host.h b/content/browser/renderer_host/render_view_host.h index 2936218..e383c14 100644 --- a/content/browser/renderer_host/render_view_host.h +++ b/content/browser/renderer_host/render_view_host.h @@ -14,7 +14,6 @@ #include "base/process_util.h" #include "chrome/browser/ui/find_bar/find_bar_controller.h" #include "chrome/common/content_settings_types.h" -#include "chrome/common/render_view_commands.h" #include "chrome/common/view_types.h" #include "content/browser/renderer_host/render_widget_host.h" #include "content/common/page_zoom.h" @@ -202,12 +201,6 @@ class RenderViewHost : public RenderWidgetHost { // hangs, in which case we need to swap to the pending RenderViewHost. int GetPendingRequestId(); - struct CommandState { - bool is_enabled; - RenderViewCommandCheckedState checked_state; - }; - CommandState GetStateForCommand(RenderViewCommand command) const; - // Stops the current load. void Stop(); @@ -539,9 +532,6 @@ class RenderViewHost : public RenderWidgetHost { int maximum_percent, bool remember); void OnScriptEvalResponse(int id, const ListValue& result); - void OnCommandStateChanged(int command, - bool is_enabled, - int checked_state); #if defined(OS_MACOSX) void OnMsgShowPopup(const ViewHostMsg_ShowPopup_Params& params); @@ -627,9 +617,6 @@ class RenderViewHost : public RenderWidgetHost { // The termination status of the last render view that terminated. base::TerminationStatus render_view_termination_status_; - // The enabled/disabled states of various commands. - std::map<RenderViewCommand, CommandState> command_states_; - // A list of observers that filter messages. Weak references. ObserverList<RenderViewHostObserver> observers_; |