| 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_CONFIRM_BUBBLE_MODEL_H_ | 5 #ifndef CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ |
| 6 #define CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ | 6 #define CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 #include "url/gurl.h" | 10 #include "url/gurl.h" |
| 11 | 11 |
| 12 namespace gfx { | |
| 13 class Image; | |
| 14 } | |
| 15 | |
| 16 // An interface implemented by objects wishing to control an ConfirmBubbleView. | 12 // An interface implemented by objects wishing to control an ConfirmBubbleView. |
| 17 // To use this class to implement a bubble menu, we need two steps: | 13 // To use this class to implement a bubble menu, we need two steps: |
| 18 // 1. Implement a class derived from this class. | 14 // 1. Implement a class derived from this class. |
| 19 // 2. Call chrome::ShowConfirmBubble() with the class implemented in 1. | 15 // 2. Call chrome::ShowConfirmBubble() with the class implemented in 1. |
| 20 class ConfirmBubbleModel { | 16 class ConfirmBubbleModel { |
| 21 public: | 17 public: |
| 22 enum BubbleButton { | 18 enum BubbleButton { |
| 23 BUTTON_NONE = 0, | 19 BUTTON_NONE = 0, |
| 24 BUTTON_OK = 1 << 0, | 20 BUTTON_OK = 1 << 0, |
| 25 BUTTON_CANCEL = 1 << 1, | 21 BUTTON_CANCEL = 1 << 1, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual GURL GetLinkURL() const; | 53 virtual GURL GetLinkURL() const; |
| 58 | 54 |
| 59 // Called when the link is clicked. | 55 // Called when the link is clicked. |
| 60 virtual void LinkClicked(); | 56 virtual void LinkClicked(); |
| 61 | 57 |
| 62 private: | 58 private: |
| 63 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleModel); | 59 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleModel); |
| 64 }; | 60 }; |
| 65 | 61 |
| 66 #endif // CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ | 62 #endif // CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ |
| OLD | NEW |