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

Side by Side Diff: chrome/browser/ui/views/toolbar/toolbar_button.h

Issue 292153008: linux_aura: Fix the insets on LabelButtons. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments about where the smaller insets come from. 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_
7 7
8 #include "ui/views/context_menu_controller.h" 8 #include "ui/views/context_menu_controller.h"
9 #include "ui/views/controls/button/button.h" 9 #include "ui/views/controls/button/button.h"
10 #include "ui/views/controls/button/label_button.h" 10 #include "ui/views/controls/button/label_button.h"
(...skipping 27 matching lines...) Expand all
38 // views::LabelButton: 38 // views::LabelButton:
39 virtual gfx::Size GetPreferredSize() const OVERRIDE; 39 virtual gfx::Size GetPreferredSize() const OVERRIDE;
40 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE; 40 virtual bool OnMousePressed(const ui::MouseEvent& event) OVERRIDE;
41 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE; 41 virtual bool OnMouseDragged(const ui::MouseEvent& event) OVERRIDE;
42 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE; 42 virtual void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
43 // Showing the drop down results in a MouseCaptureLost, we need to ignore it. 43 // Showing the drop down results in a MouseCaptureLost, we need to ignore it.
44 virtual void OnMouseCaptureLost() OVERRIDE; 44 virtual void OnMouseCaptureLost() OVERRIDE;
45 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE; 45 virtual void OnMouseExited(const ui::MouseEvent& event) OVERRIDE;
46 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 46 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
47 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE; 47 virtual void GetAccessibleState(ui::AXViewState* state) OVERRIDE;
48 virtual void SetDefaultBorderInsets(
49 views::LabelButtonBorder* border) OVERRIDE;
48 50
49 // views::ContextMenuController: 51 // views::ContextMenuController:
50 virtual void ShowContextMenuForView(View* source, 52 virtual void ShowContextMenuForView(View* source,
51 const gfx::Point& point, 53 const gfx::Point& point,
52 ui::MenuSourceType source_type) OVERRIDE; 54 ui::MenuSourceType source_type) OVERRIDE;
53 55
54 protected: 56 protected:
55 // Overridden from CustomButton. Returns true if the button should become 57 // Overridden from CustomButton. Returns true if the button should become
56 // pressed when a user holds the mouse down over the button. For this 58 // pressed when a user holds the mouse down over the button. For this
57 // implementation, both left and right mouse buttons can trigger a change 59 // implementation, both left and right mouse buttons can trigger a change
(...skipping 19 matching lines...) Expand all
77 // Menu runner to display drop down menu. 79 // Menu runner to display drop down menu.
78 scoped_ptr<views::MenuRunner> menu_runner_; 80 scoped_ptr<views::MenuRunner> menu_runner_;
79 81
80 // A factory for tasks that show the dropdown context menu for the button. 82 // A factory for tasks that show the dropdown context menu for the button.
81 base::WeakPtrFactory<ToolbarButton> show_menu_factory_; 83 base::WeakPtrFactory<ToolbarButton> show_menu_factory_;
82 84
83 DISALLOW_COPY_AND_ASSIGN(ToolbarButton); 85 DISALLOW_COPY_AND_ASSIGN(ToolbarButton);
84 }; 86 };
85 87
86 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_ 88 #endif // CHROME_BROWSER_UI_VIEWS_TOOLBAR_TOOLBAR_BUTTON_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698