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

Side by Side Diff: ui/views/controls/label.h

Issue 2345183002: Views: Draw Textfield selected text in gray when top-level Widget loses focus.
Patch Set: Refactor to use SelectionController(Delegate). Unfinished! Created 4 years 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 | « ui/views/BUILD.gn ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »
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_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 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
224 bool SupportsDrag() const override; 224 bool SupportsDrag() const override;
225 bool HasTextBeingDragged() const override; 225 bool HasTextBeingDragged() const override;
226 void SetTextBeingDragged(bool value) override; 226 void SetTextBeingDragged(bool value) override;
227 int GetViewHeight() const override; 227 int GetViewHeight() const override;
228 int GetViewWidth() const override; 228 int GetViewWidth() const override;
229 int GetDragSelectionDelay() const override; 229 int GetDragSelectionDelay() const override;
230 void OnBeforePointerAction() override; 230 void OnBeforePointerAction() override;
231 void OnAfterPointerAction(bool text_changed, bool selection_changed) override; 231 void OnAfterPointerAction(bool text_changed, bool selection_changed) override;
232 bool PasteSelectionClipboard() override; 232 bool PasteSelectionClipboard() override;
233 void UpdateSelectionClipboard() override; 233 void UpdateSelectionClipboard() override;
234 SkColor GetSelectionTextColor() const override;
235 SkColor GetSelectionBackgroundColor() const override;
236 SkColor GetSelectionBackgroundUnfocusedColor() const override;
237 void OnWillChangeFocus(View* focused_before, View* focused_now) override;
234 238
235 const gfx::RenderText* GetRenderTextForSelectionController() const; 239 const gfx::RenderText* GetRenderTextForSelectionController() const;
236 240
237 void Init(const base::string16& text, const gfx::FontList& font_list); 241 void Init(const base::string16& text, const gfx::FontList& font_list);
238 242
239 void ResetLayout(); 243 void ResetLayout();
240 244
241 // Set up |lines_| to actually be painted. 245 // Set up |lines_| to actually be painted.
242 void MaybeBuildRenderTextLines() const; 246 void MaybeBuildRenderTextLines() const;
243 247
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 bool is_first_paint_text_; 312 bool is_first_paint_text_;
309 313
310 std::unique_ptr<SelectionController> selection_controller_; 314 std::unique_ptr<SelectionController> selection_controller_;
311 315
312 DISALLOW_COPY_AND_ASSIGN(Label); 316 DISALLOW_COPY_AND_ASSIGN(Label);
313 }; 317 };
314 318
315 } // namespace views 319 } // namespace views
316 320
317 #endif // UI_VIEWS_CONTROLS_LABEL_H_ 321 #endif // UI_VIEWS_CONTROLS_LABEL_H_
OLDNEW
« no previous file with comments | « ui/views/BUILD.gn ('k') | ui/views/controls/label.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698