diff options
author | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:17:42 +0000 |
---|---|---|
committer | sail@chromium.org <sail@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-26 00:17:42 +0000 |
commit | 21cea6c0f49893d48f4299f0aa8910c1d3130914 (patch) | |
tree | 63df389b24bd96b972eaab43b2f1632960722cb4 /chrome/common/render_view_commands.h | |
parent | 6d079b9a62065433b24eae83ad689d3defb628df (diff) | |
download | chromium_src-21cea6c0f49893d48f4299f0aa8910c1d3130914.zip chromium_src-21cea6c0f49893d48f4299f0aa8910c1d3130914.tar.gz chromium_src-21cea6c0f49893d48f4299f0aa8910c1d3130914.tar.bz2 |
Mac: Enable "Check Spelling While Typing" in Edit menu
Currently the "Edit -> Spelling and Grammar -> Check Spelling While Typing" menu item is always disabled.
The problem is that the logic to enable / disable this item lives in the render process and not in the UI.
This patch implements a generic message that the render process can send to the browser to update the state of view commands. This is used to enable and disable the "Check Spelling While Typing" menu item.
BUG=38440
TEST=Clicked in an edit box and verified that the "Check Spelling While Typing" menu item was enabled. Verified that changing the value from the context menu correctly updates the Edit menu as well.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72570 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/render_view_commands.h')
-rw-r--r-- | chrome/common/render_view_commands.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/chrome/common/render_view_commands.h b/chrome/common/render_view_commands.h new file mode 100644 index 0000000..541e7ea --- /dev/null +++ b/chrome/common/render_view_commands.h @@ -0,0 +1,23 @@ +// 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. + +#ifndef CHROME_COMMON_RENDER_VIEW_COMMANDS_H_ +#define CHROME_COMMON_RENDER_VIEW_COMMANDS_H_ +#pragma once + +// These identify commands that the renderer process enables or disables +// in the browser process. For example, this is used on the Mac to keep +// the spell check menu commands in sync with the renderer state. +enum RenderViewCommand { + RENDER_VIEW_COMMAND_TOGGLE_SPELL_CHECK, +}; + +enum RenderViewCommandCheckedState { + RENDER_VIEW_COMMAND_CHECKED_STATE_UNCHECKED, + RENDER_VIEW_COMMAND_CHECKED_STATE_CHECKED, + RENDER_VIEW_COMMAND_CHECKED_STATE_MIXED, +}; + + +#endif // CHROME_COMMON_RENDER_VIEW_COMMANDS_H_ |