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

Side by Side Diff: chrome/views/native_scroll_bar.h

Issue 7344: Convert GetPreferredSize from:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 2 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) 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_VIEWS_NATIVE_SCROLLBAR_H__ 5 #ifndef CHROME_VIEWS_NATIVE_SCROLLBAR_H__
6 #define CHROME_VIEWS_NATIVE_SCROLLBAR_H__ 6 #define CHROME_VIEWS_NATIVE_SCROLLBAR_H__
7 7
8 #include "chrome/views/scroll_bar.h" 8 #include "chrome/views/scroll_bar.h"
9 9
10 namespace ChromeViews { 10 namespace ChromeViews {
(...skipping 12 matching lines...) Expand all
23 ///////////////////////////////////////////////////////////////////////////// 23 /////////////////////////////////////////////////////////////////////////////
24 class NativeScrollBar : public ScrollBar { 24 class NativeScrollBar : public ScrollBar {
25 public: 25 public:
26 26
27 // Create new scrollbar, either horizontal or vertical 27 // Create new scrollbar, either horizontal or vertical
28 explicit NativeScrollBar(bool is_horiz); 28 explicit NativeScrollBar(bool is_horiz);
29 virtual ~NativeScrollBar(); 29 virtual ~NativeScrollBar();
30 30
31 // Overridden for layout purpose 31 // Overridden for layout purpose
32 virtual void Layout(); 32 virtual void Layout();
33 virtual void GetPreferredSize(CSize* sz); 33 virtual gfx::Size GetPreferredSize();
34 virtual void DidChangeBounds(const CRect& previous, const CRect& current); 34 virtual void DidChangeBounds(const CRect& previous, const CRect& current);
35 35
36 // Overridden for keyboard UI purpose 36 // Overridden for keyboard UI purpose
37 virtual bool OnKeyPressed(const KeyEvent& event); 37 virtual bool OnKeyPressed(const KeyEvent& event);
38 virtual bool OnMouseWheel(const MouseWheelEvent& e); 38 virtual bool OnMouseWheel(const MouseWheelEvent& e);
39 39
40 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child); 40 virtual void ViewHierarchyChanged(bool is_add, View *parent, View *child);
41 41
42 // Overridden from ScrollBar 42 // Overridden from ScrollBar
43 virtual void Update(int viewport_size, int content_size, int current_pos); 43 virtual void Update(int viewport_size, int content_size, int current_pos);
(...skipping 11 matching lines...) Expand all
55 55
56 // sb_container_ is a custom hwnd that we use to wrap the real 56 // sb_container_ is a custom hwnd that we use to wrap the real
57 // windows scrollbar. We need to do this to get the scroll events 57 // windows scrollbar. We need to do this to get the scroll events
58 // without having to do anything special in the high level hwnd. 58 // without having to do anything special in the high level hwnd.
59 ScrollBarContainer* sb_container_; 59 ScrollBarContainer* sb_container_;
60 }; 60 };
61 61
62 } 62 }
63 #endif 63 #endif
64 64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698