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

Side by Side Diff: chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h

Issue 1053143002: Make View::Paint use ui::PaintRecorder to access PaintContext's canvas (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: paintrecorder: . Created 5 years, 8 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
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 CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h" 9 #include "chrome/browser/ui/omnibox/omnibox_popup_model.h"
10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h" 10 #include "chrome/browser/ui/omnibox/omnibox_popup_view.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 virtual int CalculatePopupHeight(); 85 virtual int CalculatePopupHeight();
86 virtual OmniboxResultView* CreateResultView(int model_index, 86 virtual OmniboxResultView* CreateResultView(int model_index,
87 const gfx::FontList& font_list); 87 const gfx::FontList& font_list);
88 88
89 private: 89 private:
90 class AutocompletePopupWidget; 90 class AutocompletePopupWidget;
91 91
92 // views::View: 92 // views::View:
93 const char* GetClassName() const override; 93 const char* GetClassName() const override;
94 void OnPaint(gfx::Canvas* canvas) override; 94 void OnPaint(gfx::Canvas* canvas) override;
95 void PaintChildren(const PaintContext& context) override; 95 void PaintChildren(const ui::PaintContext& context) override;
96 96
97 // views::ViewTargeterDelegate: 97 // views::ViewTargeterDelegate:
98 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override; 98 views::View* TargetForRect(views::View* root, const gfx::Rect& rect) override;
99 99
100 // Call immediately after construction. 100 // Call immediately after construction.
101 void Init(); 101 void Init();
102 102
103 // Returns true if the model has a match at the specified index. 103 // Returns true if the model has a match at the specified index.
104 bool HasMatchAt(size_t index) const; 104 bool HasMatchAt(size_t index) const;
105 105
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 160
161 // When the dropdown is not wide enough while displaying postfix suggestions, 161 // When the dropdown is not wide enough while displaying postfix suggestions,
162 // we use the width of widest match contents to shift the suggestions so that 162 // we use the width of widest match contents to shift the suggestions so that
163 // the widest suggestion just reaches the end edge. 163 // the widest suggestion just reaches the end edge.
164 int max_match_contents_width_; 164 int max_match_contents_width_;
165 165
166 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView); 166 DISALLOW_COPY_AND_ASSIGN(OmniboxPopupContentsView);
167 }; 167 };
168 168
169 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_ 169 #endif // CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_POPUP_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698