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

Side by Side Diff: views/controls/native_control.h

Issue 6246001: Move app/key* to ui/base/keycodes/* (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 11 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
« no previous file with comments | « views/controls/menu/native_menu_win.cc ('k') | views/controls/native_control.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 VIEWS_CONTROLS_NATIVE_CONTROL_H_ 5 #ifndef VIEWS_CONTROLS_NATIVE_CONTROL_H_
6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_ 6 #define VIEWS_CONTROLS_NATIVE_CONTROL_H_
7 #pragma once 7 #pragma once
8 8
9 #include <windows.h> 9 #include <windows.h>
10 10
11 #include "app/keyboard_codes.h" 11 #include "ui/base/keycodes/keyboard_codes.h"
12 #include "views/view.h" 12 #include "views/view.h"
13 13
14 namespace views { 14 namespace views {
15 15
16 class NativeViewHost; 16 class NativeViewHost;
17 class NativeControlContainer; 17 class NativeControlContainer;
18 18
19 //////////////////////////////////////////////////////////////////////////////// 19 ////////////////////////////////////////////////////////////////////////////////
20 // 20 //
21 // NativeControl is an abstract view that is used to implement views wrapping 21 // NativeControl is an abstract view that is used to implement views wrapping
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Overridden so that the control properly reflects parent's visibility. 75 // Overridden so that the control properly reflects parent's visibility.
76 virtual void VisibilityChanged(View* starting_from, bool is_visible); 76 virtual void VisibilityChanged(View* starting_from, bool is_visible);
77 77
78 // Controls that have fixed sizes should call these methods to specify the 78 // Controls that have fixed sizes should call these methods to specify the
79 // actual size and how they should be aligned within their parent. 79 // actual size and how they should be aligned within their parent.
80 void SetFixedWidth(int width, Alignment alignment); 80 void SetFixedWidth(int width, Alignment alignment);
81 void SetFixedHeight(int height, Alignment alignment); 81 void SetFixedHeight(int height, Alignment alignment);
82 82
83 // Invoked when a key is pressed on the control. 83 // Invoked when a key is pressed on the control.
84 // Should return true if the key message was processed, false otherwise. 84 // Should return true if the key message was processed, false otherwise.
85 virtual bool OnKeyDown(app::KeyboardCode virtual_key_code) { return false; } 85 virtual bool OnKeyDown(ui::KeyboardCode virtual_key_code) { return false; }
86 86
87 // Returns additional extended style flags. When subclasses call 87 // Returns additional extended style flags. When subclasses call
88 // CreateWindowEx in order to create the underlying control, they must OR the 88 // CreateWindowEx in order to create the underlying control, they must OR the
89 // ExStyle parameter with the value returned by this function. 89 // ExStyle parameter with the value returned by this function.
90 // 90 //
91 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL 91 // We currently use this method in order to add flags such as WS_EX_LAYOUTRTL
92 // to the HWND for views with right-to-left UI layout. 92 // to the HWND for views with right-to-left UI layout.
93 DWORD GetAdditionalExStyle() const; 93 DWORD GetAdditionalExStyle() const;
94 94
95 // TODO(xji): we use the following temporary function as we transition the 95 // TODO(xji): we use the following temporary function as we transition the
(...skipping 21 matching lines...) Expand all
117 WPARAM w_param, LPARAM l_param); 117 WPARAM w_param, LPARAM l_param);
118 118
119 NativeControlContainer* container_; 119 NativeControlContainer* container_;
120 120
121 DISALLOW_COPY_AND_ASSIGN(NativeControl); 121 DISALLOW_COPY_AND_ASSIGN(NativeControl);
122 }; 122 };
123 123
124 } // namespace views 124 } // namespace views
125 125
126 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_ 126 #endif // VIEWS_CONTROLS_NATIVE_CONTROL_H_
OLDNEW
« no previous file with comments | « views/controls/menu/native_menu_win.cc ('k') | views/controls/native_control.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698