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

Side by Side Diff: ui/views/controls/scrollbar/native_scroll_bar_win.h

Issue 10825254: Remove views::KeyEvent, replacing uses of it with ui::KeyEvent. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_
7 7
8 #include "ui/views/controls/native_control_win.h" 8 #include "ui/views/controls/native_control_win.h"
9 #include "ui/views/controls/scrollbar/native_scroll_bar_wrapper.h" 9 #include "ui/views/controls/scrollbar/native_scroll_bar_wrapper.h"
10 10
(...skipping 16 matching lines...) Expand all
27 // Create new scrollbar, either horizontal or vertical. 27 // Create new scrollbar, either horizontal or vertical.
28 explicit NativeScrollBarWin(NativeScrollBar* native_scroll_bar); 28 explicit NativeScrollBarWin(NativeScrollBar* native_scroll_bar);
29 virtual ~NativeScrollBarWin(); 29 virtual ~NativeScrollBarWin();
30 30
31 private: 31 private:
32 // Overridden from View for layout purpose. 32 // Overridden from View for layout purpose.
33 virtual void Layout(); 33 virtual void Layout();
34 virtual gfx::Size GetPreferredSize(); 34 virtual gfx::Size GetPreferredSize();
35 35
36 // Overridden from View for keyboard UI purpose. 36 // Overridden from View for keyboard UI purpose.
37 virtual bool OnKeyPressed(const KeyEvent& event); 37 virtual bool OnKeyPressed(const ui::KeyEvent& event);
38 virtual bool OnMouseWheel(const MouseWheelEvent& e); 38 virtual bool OnMouseWheel(const MouseWheelEvent& e);
39 39
40 // Overridden from NativeControlWin. 40 // Overridden from NativeControlWin.
41 virtual void CreateNativeControl(); 41 virtual void CreateNativeControl();
42 42
43 // Overridden from ScrollBarWrapper. 43 // Overridden from ScrollBarWrapper.
44 virtual int GetPosition() const; 44 virtual int GetPosition() const;
45 virtual View* GetView(); 45 virtual View* GetView();
46 virtual void Update(int viewport_size, int content_size, int current_pos); 46 virtual void Update(int viewport_size, int content_size, int current_pos);
47 47
48 // The NativeScrollBar we are bound to. 48 // The NativeScrollBar we are bound to.
49 NativeScrollBar* native_scroll_bar_; 49 NativeScrollBar* native_scroll_bar_;
50 50
51 // sb_container_ is a custom hwnd that we use to wrap the real 51 // sb_container_ is a custom hwnd that we use to wrap the real
52 // windows scrollbar. We need to do this to get the scroll events 52 // windows scrollbar. We need to do this to get the scroll events
53 // without having to do anything special in the high level hwnd. 53 // without having to do anything special in the high level hwnd.
54 scoped_ptr<ScrollBarContainer> sb_container_; 54 scoped_ptr<ScrollBarContainer> sb_container_;
55 55
56 // Last scrollbar state we wrote to the scrollbar. We keep it here, so we can 56 // Last scrollbar state we wrote to the scrollbar. We keep it here, so we can
57 // reinitialize the scrollbar to its previous state in case it gets hidden and 57 // reinitialize the scrollbar to its previous state in case it gets hidden and
58 // recreated. 58 // recreated.
59 SCROLLINFO scroll_info_; 59 SCROLLINFO scroll_info_;
60 60
61 DISALLOW_COPY_AND_ASSIGN(NativeScrollBarWin); 61 DISALLOW_COPY_AND_ASSIGN(NativeScrollBarWin);
62 }; 62 };
63 63
64 } // namespace views 64 } // namespace views
65 65
66 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_ 66 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_WIN_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/native_scroll_bar.cc ('k') | ui/views/controls/scrollbar/native_scroll_bar_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698