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 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 Loading... |
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_ |
OLD | NEW |