OLD | NEW |
---|---|
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_LABEL_H_ | 5 #ifndef UI_VIEWS_CONTROLS_LABEL_H_ |
6 #define UI_VIEWS_CONTROLS_LABEL_H_ | 6 #define UI_VIEWS_CONTROLS_LABEL_H_ |
7 | 7 |
8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
9 #include "base/gtest_prod_util.h" | 9 #include "base/gtest_prod_util.h" |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
283 | 283 |
284 // ui::SimpleMenuModel::Delegate overrides: | 284 // ui::SimpleMenuModel::Delegate overrides: |
285 bool IsCommandIdChecked(int command_id) const override; | 285 bool IsCommandIdChecked(int command_id) const override; |
286 bool IsCommandIdEnabled(int command_id) const override; | 286 bool IsCommandIdEnabled(int command_id) const override; |
287 void ExecuteCommand(int command_id, int event_flags) override; | 287 void ExecuteCommand(int command_id, int event_flags) override; |
288 bool GetAcceleratorForCommandId(int command_id, | 288 bool GetAcceleratorForCommandId(int command_id, |
289 ui::Accelerator* accelerator) const override; | 289 ui::Accelerator* accelerator) const override; |
290 | 290 |
291 const gfx::RenderText* GetRenderTextForSelectionController() const; | 291 const gfx::RenderText* GetRenderTextForSelectionController() const; |
292 | 292 |
293 void Init(const base::string16& text, const gfx::FontList& font_list); | 293 void Init(const base::string16& text); |
Peter Kasting
2017/04/04 00:47:58
Why scrap the second arg? At least for now it loo
tapted
2017/04/04 06:23:00
Ah, this made more sense back in Patchset1 where I
| |
294 | 294 |
295 void ResetLayout(); | 295 void ResetLayout(); |
296 | 296 |
297 // Set up |lines_| to actually be painted. | 297 // Set up |lines_| to actually be painted. |
298 void MaybeBuildRenderTextLines() const; | 298 void MaybeBuildRenderTextLines() const; |
299 | 299 |
300 gfx::Rect GetFocusBounds() const; | 300 gfx::Rect GetFocusBounds() const; |
301 | 301 |
302 // Get the text broken into lines as needed to fit the given |width|. | 302 // Get the text broken into lines as needed to fit the given |width|. |
303 std::vector<base::string16> GetLinesForWidth(int width) const; | 303 std::vector<base::string16> GetLinesForWidth(int width) const; |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
377 // Context menu related members. | 377 // Context menu related members. |
378 ui::SimpleMenuModel context_menu_contents_; | 378 ui::SimpleMenuModel context_menu_contents_; |
379 std::unique_ptr<views::MenuRunner> context_menu_runner_; | 379 std::unique_ptr<views::MenuRunner> context_menu_runner_; |
380 | 380 |
381 DISALLOW_COPY_AND_ASSIGN(Label); | 381 DISALLOW_COPY_AND_ASSIGN(Label); |
382 }; | 382 }; |
383 | 383 |
384 } // namespace views | 384 } // namespace views |
385 | 385 |
386 #endif // UI_VIEWS_CONTROLS_LABEL_H_ | 386 #endif // UI_VIEWS_CONTROLS_LABEL_H_ |
OLD | NEW |