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

Side by Side Diff: ui/views/cocoa/bridged_content_view.h

Issue 329463002: MacViews: Implement text input. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More changes for tapted. Created 6 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ 5 #ifndef UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_
6 #define UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ 6 #define UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 namespace ui {
11 class TextInputClient;
12 }
13
10 namespace views { 14 namespace views {
11 class View; 15 class View;
12 } 16 }
13 17
14 // The NSView that sits as the root contentView of the NSWindow, whilst it has 18 // The NSView that sits as the root contentView of the NSWindow, whilst it has
15 // a views::RootView present. Bridges requests from Cocoa to the hosted 19 // a views::RootView present. Bridges requests from Cocoa to the hosted
16 // views::View. 20 // views::View.
17 @interface BridgedContentView : NSView { 21 @interface BridgedContentView : NSView<NSTextInputClient> {
18 @private 22 @private
19 // Weak. The hosted RootView, owned by hostedView_->GetWidget(). 23 // Weak. The hosted RootView, owned by hostedView_->GetWidget().
20 views::View* hostedView_; 24 views::View* hostedView_;
25
26 // Weak. If non-null the TextInputClient of the currently focused View in the
27 // hierarchy rooted at |hostedView_|. Owned by the focused View.
28 ui::TextInputClient* textInputClient_;
21 } 29 }
22 30
23 @property(readonly, nonatomic) views::View* hostedView; 31 @property(readonly, nonatomic) views::View* hostedView;
32 @property(assign, nonatomic) ui::TextInputClient* textInputClient;
24 33
25 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL. 34 // Initialize the NSView -> views::View bridge. |viewToHost| must be non-NULL.
26 - (id)initWithView:(views::View*)viewToHost; 35 - (id)initWithView:(views::View*)viewToHost;
27 36
28 // Clear the hosted view. For example, if it is about to be destroyed. 37 // Clear the hosted view. For example, if it is about to be destroyed.
29 - (void)clearView; 38 - (void)clearView;
30 39
31 @end 40 @end
32 41
33 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_ 42 #endif // UI_VIEWS_COCOA_BRIDGED_CONTENT_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/cocoa/bridged_content_view.mm » ('j') | ui/views/cocoa/bridged_content_view.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698