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

Side by Side Diff: chrome/browser/renderer_host/render_widget_host_view_mac.h

Issue 2805075: [Mac]Handle edit commands from input methods correctly. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: git-try -b mac Created 10 years, 5 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
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 5 #ifndef CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 6 #define CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 #import <QuartzCore/CALayer.h> 9 #import <QuartzCore/CALayer.h>
10 10
11 #include "base/scoped_nsobject.h" 11 #include "base/scoped_nsobject.h"
12 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
13 #include "base/task.h" 13 #include "base/task.h"
14 #include "base/time.h" 14 #include "base/time.h"
15 #include "chrome/browser/cocoa/base_view.h" 15 #include "chrome/browser/cocoa/base_view.h"
16 #include "chrome/browser/cocoa/browser_accessibility.h" 16 #include "chrome/browser/cocoa/browser_accessibility.h"
17 #include "chrome/browser/cocoa/browser_accessibility_delegate.h" 17 #include "chrome/browser/cocoa/browser_accessibility_delegate.h"
18 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h" 18 #include "chrome/browser/renderer_host/accelerated_surface_container_manager_mac .h"
19 #include "chrome/browser/renderer_host/render_widget_host_view.h" 19 #include "chrome/browser/renderer_host/render_widget_host_view.h"
20 #include "chrome/common/edit_command.h"
20 #include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h" 21 #include "third_party/WebKit/WebKit/chromium/public/WebCompositionUnderline.h"
21 #include "webkit/glue/webcursor.h" 22 #include "webkit/glue/webcursor.h"
22 #include "webkit/glue/webmenuitem.h" 23 #include "webkit/glue/webmenuitem.h"
23 24
24 class RenderWidgetHostViewMac; 25 class RenderWidgetHostViewMac;
25 class RWHVMEditCommandHelper; 26 class RWHVMEditCommandHelper;
26 @class ToolTip; 27 @class ToolTip;
27 28
28 @protocol RenderWidgetHostViewMacOwner 29 @protocol RenderWidgetHostViewMacOwner
29 - (RenderWidgetHostViewMac*)renderWidgetHostViewMac; 30 - (RenderWidgetHostViewMac*)renderWidgetHostViewMac;
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 NSRange selectedRange_; 108 NSRange selectedRange_;
108 109
109 // Text to be inserted which was generated by handling a key down event. 110 // Text to be inserted which was generated by handling a key down event.
110 string16 textToBeInserted_; 111 string16 textToBeInserted_;
111 112
112 // Marked text which was generated by handling a key down event. 113 // Marked text which was generated by handling a key down event.
113 string16 markedText_; 114 string16 markedText_;
114 115
115 // Underline information of the |markedText_|. 116 // Underline information of the |markedText_|.
116 std::vector<WebKit::WebCompositionUnderline> underlines_; 117 std::vector<WebKit::WebCompositionUnderline> underlines_;
118
119 // Indicates if doCommandBySelector method receives any edit command when
120 // handling a key down event.
121 BOOL hasEditCommands_;
122
123 // Contains edit commands received by the -doCommandBySelector: method when
124 // handling a key down event, not including inserting commands, eg. insertTab,
125 // etc.
126 EditCommands editCommands_;
117 } 127 }
118 128
119 @property(assign, nonatomic) NSRect caretRect; 129 @property(assign, nonatomic) NSRect caretRect;
120 130
121 - (void)setCanBeKeyView:(BOOL)can; 131 - (void)setCanBeKeyView:(BOOL)can;
122 - (void)setCloseOnDeactivate:(BOOL)b; 132 - (void)setCloseOnDeactivate:(BOOL)b;
123 - (void)setToolTipAtMousePoint:(NSString *)string; 133 - (void)setToolTipAtMousePoint:(NSString *)string;
124 // Makes sure that the initial layer setup for accelerated plugin drawing has 134 // Makes sure that the initial layer setup for accelerated plugin drawing has
125 // been done. Can be called multiple times. 135 // been done. Can be called multiple times.
126 - (void)ensureAcceleratedPluginLayer; 136 - (void)ensureAcceleratedPluginLayer;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 // Helper class for managing instances of accelerated plug-ins. 326 // Helper class for managing instances of accelerated plug-ins.
317 AcceleratedSurfaceContainerManagerMac plugin_container_manager_; 327 AcceleratedSurfaceContainerManagerMac plugin_container_manager_;
318 328
319 // Whether or not web accessibility is enabled. 329 // Whether or not web accessibility is enabled.
320 bool renderer_accessible_; 330 bool renderer_accessible_;
321 331
322 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac); 332 DISALLOW_COPY_AND_ASSIGN(RenderWidgetHostViewMac);
323 }; 333 };
324 334
325 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_ 335 #endif // CHROME_BROWSER_RENDERER_HOST_RENDER_WIDGET_HOST_VIEW_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/renderer_host/render_widget_host_view_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698