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

Side by Side Diff: ui/app_list/views/app_list_item_view.h

Issue 867003002: Cache gfx::RenderText instances in views::Label. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 10 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
« no previous file with comments | « no previous file | ui/app_list/views/app_list_item_view.cc » ('j') | ui/views/controls/label.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // Invoked when |mouse_drag_timer_| fires to show dragging UI. 105 // Invoked when |mouse_drag_timer_| fires to show dragging UI.
106 void OnMouseDragTimer(); 106 void OnMouseDragTimer();
107 107
108 // If the item is not in a folder, not highlighted, not being dragged, and not 108 // If the item is not in a folder, not highlighted, not being dragged, and not
109 // having something dropped onto it, enables subpixel AA for the title. 109 // having something dropped onto it, enables subpixel AA for the title.
110 void SetTitleSubpixelAA(); 110 void SetTitleSubpixelAA();
111 111
112 // views::View overrides: 112 // views::View overrides:
113 const char* GetClassName() const override; 113 const char* GetClassName() const override;
114 void Layout() override; 114 void Layout() override;
115 void SchedulePaintInRect(const gfx::Rect& r) override;
116 void OnPaint(gfx::Canvas* canvas) override; 115 void OnPaint(gfx::Canvas* canvas) override;
117 116
118 // views::ContextMenuController overrides: 117 // views::ContextMenuController overrides:
119 void ShowContextMenuForView(views::View* source, 118 void ShowContextMenuForView(views::View* source,
120 const gfx::Point& point, 119 const gfx::Point& point,
121 ui::MenuSourceType source_type) override; 120 ui::MenuSourceType source_type) override;
122 121
123 // views::CustomButton overrides: 122 // views::CustomButton overrides:
124 void StateChanged() override; 123 void StateChanged() override;
125 bool ShouldEnterPushedState(const ui::Event& event) override; 124 bool ShouldEnterPushedState(const ui::Event& event) override;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 159
161 // A timer to defer showing drag UI when mouse is pressed. 160 // A timer to defer showing drag UI when mouse is pressed.
162 base::OneShotTimer<AppListItemView> mouse_drag_timer_; 161 base::OneShotTimer<AppListItemView> mouse_drag_timer_;
163 162
164 DISALLOW_COPY_AND_ASSIGN(AppListItemView); 163 DISALLOW_COPY_AND_ASSIGN(AppListItemView);
165 }; 164 };
166 165
167 } // namespace app_list 166 } // namespace app_list
168 167
169 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_ 168 #endif // UI_APP_LIST_VIEWS_APP_LIST_ITEM_VIEW_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/app_list_item_view.cc » ('j') | ui/views/controls/label.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698