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

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

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 22 matching lines...) Expand all
33 33
34 // Return the system sizes. 34 // Return the system sizes.
35 static int GetHorizontalScrollBarHeight(const ui::NativeTheme* theme); 35 static int GetHorizontalScrollBarHeight(const ui::NativeTheme* theme);
36 static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme); 36 static int GetVerticalScrollBarWidth(const ui::NativeTheme* theme);
37 37
38 private: 38 private:
39 friend class NativeScrollBarTest; 39 friend class NativeScrollBarTest;
40 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, Scrolling); 40 FRIEND_TEST_ALL_PREFIXES(NativeScrollBarTest, Scrolling);
41 41
42 // Overridden from View. 42 // Overridden from View.
43 virtual gfx::Size GetPreferredSize() OVERRIDE; 43 virtual gfx::Size GetPreferredSize() const OVERRIDE;
44 virtual void Layout() OVERRIDE; 44 virtual void Layout() OVERRIDE;
45 virtual void ViewHierarchyChanged( 45 virtual void ViewHierarchyChanged(
46 const ViewHierarchyChangedDetails& details) OVERRIDE; 46 const ViewHierarchyChangedDetails& details) OVERRIDE;
47 virtual const char* GetClassName() const OVERRIDE; 47 virtual const char* GetClassName() const OVERRIDE;
48 48
49 // Overrideen from View for keyboard UI purpose. 49 // Overrideen from View for keyboard UI purpose.
50 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 50 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
51 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE; 51 virtual bool OnMouseWheel(const ui::MouseWheelEvent& e) OVERRIDE;
52 52
53 // Overridden from ui::EventHandler. 53 // Overridden from ui::EventHandler.
54 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 54 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
55 55
56 // Overridden from ScrollBar. 56 // Overridden from ScrollBar.
57 virtual void Update(int viewport_size, 57 virtual void Update(int viewport_size,
58 int content_size, 58 int content_size,
59 int current_pos) OVERRIDE; 59 int current_pos) OVERRIDE;
60 virtual int GetPosition() const OVERRIDE; 60 virtual int GetPosition() const OVERRIDE;
61 virtual int GetLayoutSize() const OVERRIDE; 61 virtual int GetLayoutSize() const OVERRIDE;
62 62
63 // init border 63 // init border
64 NativeScrollBarWrapper* native_wrapper_; 64 NativeScrollBarWrapper* native_wrapper_;
65 65
66 DISALLOW_COPY_AND_ASSIGN(NativeScrollBar); 66 DISALLOW_COPY_AND_ASSIGN(NativeScrollBar);
67 }; 67 };
68 68
69 } // namespace views 69 } // namespace views
70 70
71 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_ 71 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_NATIVE_SCROLL_BAR_H_
OLDNEW
« no previous file with comments | « ui/views/controls/scrollbar/kennedy_scroll_bar.cc ('k') | ui/views/controls/scrollbar/native_scroll_bar.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698