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

Side by Side Diff: chrome/browser/ui/views/autofill/autofill_dialog_views.h

Issue 1029263011: Don't call PaintChildren() from inside OnPaint(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | chrome/browser/ui/views/autofill/autofill_dialog_views.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 CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 6 #define CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
7 7
8 #include <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 10
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ~NotificationArea() override; 256 ~NotificationArea() override;
257 257
258 // Displays the given notifications. 258 // Displays the given notifications.
259 void SetNotifications(const std::vector<DialogNotification>& notifications); 259 void SetNotifications(const std::vector<DialogNotification>& notifications);
260 260
261 // views::View implementation. 261 // views::View implementation.
262 gfx::Size GetPreferredSize() const override; 262 gfx::Size GetPreferredSize() const override;
263 const char* GetClassName() const override; 263 const char* GetClassName() const override;
264 void PaintChildren(gfx::Canvas* canvas, 264 void PaintChildren(gfx::Canvas* canvas,
265 const views::CullSet& cull_set) override; 265 const views::CullSet& cull_set) override;
266 void OnPaint(gfx::Canvas* canvas) override;
267 266
268 void set_arrow_centering_anchor( 267 void set_arrow_centering_anchor(
269 const base::WeakPtr<views::View>& arrow_centering_anchor) { 268 const base::WeakPtr<views::View>& arrow_centering_anchor) {
270 arrow_centering_anchor_ = arrow_centering_anchor; 269 arrow_centering_anchor_ = arrow_centering_anchor;
271 } 270 }
272 271
273 private: 272 private:
274 // Utility function for determining whether an arrow should be drawn 273 // Utility function for determining whether an arrow should be drawn
275 // pointing at |arrow_centering_anchor_|. 274 // pointing at |arrow_centering_anchor_|.
276 bool HasArrow(); 275 bool HasArrow();
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
338 337
339 // A button to show address or billing suggestions. 338 // A button to show address or billing suggestions.
340 class SuggestedButton : public views::MenuButton { 339 class SuggestedButton : public views::MenuButton {
341 public: 340 public:
342 explicit SuggestedButton(views::MenuButtonListener* listener); 341 explicit SuggestedButton(views::MenuButtonListener* listener);
343 ~SuggestedButton() override; 342 ~SuggestedButton() override;
344 343
345 // views::MenuButton implementation. 344 // views::MenuButton implementation.
346 gfx::Size GetPreferredSize() const override; 345 gfx::Size GetPreferredSize() const override;
347 const char* GetClassName() const override; 346 const char* GetClassName() const override;
348 void PaintChildren(gfx::Canvas* canvas,
349 const views::CullSet& cull_set) override;
350 void OnPaint(gfx::Canvas* canvas) override; 347 void OnPaint(gfx::Canvas* canvas) override;
351 348
352 private: 349 private:
353 // Returns the corred resource ID (i.e. IDR_*) for the current |state()|. 350 // Returns the corred resource ID (i.e. IDR_*) for the current |state()|.
354 int ResourceIDForState() const; 351 int ResourceIDForState() const;
355 352
356 DISALLOW_COPY_AND_ASSIGN(SuggestedButton); 353 DISALLOW_COPY_AND_ASSIGN(SuggestedButton);
357 }; 354 };
358 355
359 // A view that runs a callback whenever its bounds change, and which can 356 // A view that runs a callback whenever its bounds change, and which can
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 677
681 // Used to tell the delegate when focus moves to hide the Autofill popup. 678 // Used to tell the delegate when focus moves to hide the Autofill popup.
682 scoped_ptr<ui::EventHandler> event_handler_; 679 scoped_ptr<ui::EventHandler> event_handler_;
683 680
684 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); 681 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews);
685 }; 682 };
686 683
687 } // namespace autofill 684 } // namespace autofill
688 685
689 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ 686 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/autofill/autofill_dialog_views.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698