Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(580)

Side by Side Diff: chrome/browser/cocoa/rwhvm_editcommand_helper.h

Issue 209046: Forward edit commands to be executed for shortcuts which aren't handled by... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
Property Changes:
Name: svn:eol-style
+ LF
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_ 5 #ifndef CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
6 #define CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_ 6 #define CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/hash_tables.h" 10 #include "base/hash_tables.h"
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 // protocol. 44 // protocol.
45 void AddEditingSelectorsToClass(Class klass); 45 void AddEditingSelectorsToClass(Class klass);
46 46
47 // Is a given menu item currently enabled? 47 // Is a given menu item currently enabled?
48 // SEL - the objc selector currently associated with an NSMenuItem. 48 // SEL - the objc selector currently associated with an NSMenuItem.
49 // owner - An object we can retrieve a RenderWidgetHostViewMac from to 49 // owner - An object we can retrieve a RenderWidgetHostViewMac from to
50 // determine the command states. 50 // determine the command states.
51 bool IsMenuItemEnabled(SEL item_action, 51 bool IsMenuItemEnabled(SEL item_action,
52 id<RenderWidgetHostViewMacOwner> owner); 52 id<RenderWidgetHostViewMacOwner> owner);
53 53
54 // Converts an editing selector into a command name that can be sent to
55 // webkit.
56 static NSString* CommandNameForSelector(SEL selector);
57
54 protected: 58 protected:
55 // Gets a list of all the selectors that AddEditingSelectorsToClass adds to 59 // Gets a list of all the selectors that AddEditingSelectorsToClass adds to
56 // the aforementioned class. 60 // the aforementioned class.
57 // returns an array of NSStrings WITHOUT the trailing ':'s. 61 // returns an array of NSStrings WITHOUT the trailing ':'s.
58 NSArray* GetEditSelectorNames(); 62 NSArray* GetEditSelectorNames();
59 63
60 private: 64 private:
61 base::hash_set<std::string> edit_command_set_; 65 base::hash_set<std::string> edit_command_set_;
62 DISALLOW_COPY_AND_ASSIGN(RWHVMEditCommandHelper); 66 DISALLOW_COPY_AND_ASSIGN(RWHVMEditCommandHelper);
63 }; 67 };
64 68
65 #endif // CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_ 69 #endif // CHROME_BROWSER_COCOA_RWHVM_EDITCOMMAND_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698