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

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

Issue 16979002: Add ContextMenuSourceType to views::ContextMenuController::ShowContextMenuForView. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 (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_BASE_SCROLL_BAR_H_ 5 #ifndef UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 6 #define UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
7 7
8 #include "base/gtest_prod_util.h" 8 #include "base/gtest_prod_util.h"
9 #include "ui/views/animation/scroll_animator.h" 9 #include "ui/views/animation/scroll_animator.h"
10 #include "ui/views/context_menu_controller.h" 10 #include "ui/views/context_menu_controller.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 virtual void Update(int viewport_size, 81 virtual void Update(int viewport_size,
82 int content_size, 82 int content_size,
83 int contents_scroll_offset) OVERRIDE; 83 int contents_scroll_offset) OVERRIDE;
84 virtual int GetLayoutSize() const OVERRIDE = 0; 84 virtual int GetLayoutSize() const OVERRIDE = 0;
85 virtual int GetPosition() const OVERRIDE; 85 virtual int GetPosition() const OVERRIDE;
86 86
87 // ScrollDelegate overrides: 87 // ScrollDelegate overrides:
88 virtual bool OnScroll(float dx, float dy) OVERRIDE; 88 virtual bool OnScroll(float dx, float dy) OVERRIDE;
89 89
90 // ContextMenuController overrides: 90 // ContextMenuController overrides:
91 virtual void ShowContextMenuForView(View* source, 91 virtual void ShowContextMenuForView(
92 const gfx::Point& point) OVERRIDE; 92 View* source,
93 const gfx::Point& point,
94 ui::ContextMenuSourceType source_type) OVERRIDE;
93 95
94 // Menu::Delegate overrides: 96 // Menu::Delegate overrides:
95 virtual string16 GetLabel(int id) const OVERRIDE; 97 virtual string16 GetLabel(int id) const OVERRIDE;
96 virtual bool IsCommandEnabled(int id) const OVERRIDE; 98 virtual bool IsCommandEnabled(int id) const OVERRIDE;
97 virtual void ExecuteCommand(int id) OVERRIDE; 99 virtual void ExecuteCommand(int id) OVERRIDE;
98 100
99 protected: 101 protected:
100 // View overrides: 102 // View overrides:
101 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0; 103 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE = 0;
102 104
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 178
177 scoped_ptr<MenuRunner> menu_runner_; 179 scoped_ptr<MenuRunner> menu_runner_;
178 scoped_ptr<ScrollAnimator> scroll_animator_; 180 scoped_ptr<ScrollAnimator> scroll_animator_;
179 181
180 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar); 182 DISALLOW_COPY_AND_ASSIGN(BaseScrollBar);
181 }; 183 };
182 184
183 } // namespace views 185 } // namespace views
184 186
185 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_ 187 #endif // UI_VIEWS_CONTROLS_SCROLLBAR_BASE_SCROLL_BAR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698