| 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 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 public: | 254 public: |
| 255 explicit NotificationArea(AutofillDialogViewDelegate* delegate); | 255 explicit NotificationArea(AutofillDialogViewDelegate* delegate); |
| 256 virtual ~NotificationArea(); | 256 virtual ~NotificationArea(); |
| 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 virtual gfx::Size GetPreferredSize() OVERRIDE; | 262 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 263 virtual const char* GetClassName() const OVERRIDE; | 263 virtual const char* GetClassName() const OVERRIDE; |
| 264 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 264 virtual void PaintChildren(gfx::Canvas* canvas, |
| 265 const views::CullSet& cull_set) OVERRIDE; |
| 265 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 266 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 266 | 267 |
| 267 void set_arrow_centering_anchor( | 268 void set_arrow_centering_anchor( |
| 268 const base::WeakPtr<views::View>& arrow_centering_anchor) { | 269 const base::WeakPtr<views::View>& arrow_centering_anchor) { |
| 269 arrow_centering_anchor_ = arrow_centering_anchor; | 270 arrow_centering_anchor_ = arrow_centering_anchor; |
| 270 } | 271 } |
| 271 | 272 |
| 272 private: | 273 private: |
| 273 // Utility function for determining whether an arrow should be drawn | 274 // Utility function for determining whether an arrow should be drawn |
| 274 // pointing at |arrow_centering_anchor_|. | 275 // pointing at |arrow_centering_anchor_|. |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 | 335 |
| 335 // A button to show address or billing suggestions. | 336 // A button to show address or billing suggestions. |
| 336 class SuggestedButton : public views::MenuButton { | 337 class SuggestedButton : public views::MenuButton { |
| 337 public: | 338 public: |
| 338 explicit SuggestedButton(views::MenuButtonListener* listener); | 339 explicit SuggestedButton(views::MenuButtonListener* listener); |
| 339 virtual ~SuggestedButton(); | 340 virtual ~SuggestedButton(); |
| 340 | 341 |
| 341 // views::MenuButton implementation. | 342 // views::MenuButton implementation. |
| 342 virtual gfx::Size GetPreferredSize() OVERRIDE; | 343 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 343 virtual const char* GetClassName() const OVERRIDE; | 344 virtual const char* GetClassName() const OVERRIDE; |
| 344 virtual void PaintChildren(gfx::Canvas* canvas) OVERRIDE; | 345 virtual void PaintChildren(gfx::Canvas* canvas, |
| 346 const views::CullSet& cull_set) OVERRIDE; |
| 345 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; | 347 virtual void OnPaint(gfx::Canvas* canvas) OVERRIDE; |
| 346 | 348 |
| 347 private: | 349 private: |
| 348 // 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()|. |
| 349 int ResourceIDForState() const; | 351 int ResourceIDForState() const; |
| 350 | 352 |
| 351 DISALLOW_COPY_AND_ASSIGN(SuggestedButton); | 353 DISALLOW_COPY_AND_ASSIGN(SuggestedButton); |
| 352 }; | 354 }; |
| 353 | 355 |
| 354 // 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 Loading... |
| 675 | 677 |
| 676 // 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. |
| 677 scoped_ptr<ui::EventHandler> event_handler_; | 679 scoped_ptr<ui::EventHandler> event_handler_; |
| 678 | 680 |
| 679 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); | 681 DISALLOW_COPY_AND_ASSIGN(AutofillDialogViews); |
| 680 }; | 682 }; |
| 681 | 683 |
| 682 } // namespace autofill | 684 } // namespace autofill |
| 683 | 685 |
| 684 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ | 686 #endif // CHROME_BROWSER_UI_VIEWS_AUTOFILL_AUTOFILL_DIALOG_VIEWS_H_ |
| OLD | NEW |