| 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/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/strings/string16.h" | 9 #include "base/strings/string16.h" |
| 10 | 10 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 }; | 25 }; |
| 26 | 26 |
| 27 ConfirmBubbleModel(); | 27 ConfirmBubbleModel(); |
| 28 virtual ~ConfirmBubbleModel(); | 28 virtual ~ConfirmBubbleModel(); |
| 29 | 29 |
| 30 // Returns the title string and the message string to be displayed for this | 30 // Returns the title string and the message string to be displayed for this |
| 31 // bubble menu. These must not be empty strings. | 31 // bubble menu. These must not be empty strings. |
| 32 virtual base::string16 GetTitle() const = 0; | 32 virtual base::string16 GetTitle() const = 0; |
| 33 virtual base::string16 GetMessageText() const = 0; | 33 virtual base::string16 GetMessageText() const = 0; |
| 34 | 34 |
| 35 // Returns an icon for the bubble. This image should be owned by the | |
| 36 // ResourceBundle and callers should not take ownership of it. Must not return | |
| 37 // NULL. | |
| 38 virtual gfx::Image* GetIcon() const = 0; | |
| 39 | |
| 40 // Return the buttons to be shown for this bubble menu. This function returns | 35 // Return the buttons to be shown for this bubble menu. This function returns |
| 41 // a combination of BubbleButton values, e.g. when we show both an OK button | 36 // a combination of BubbleButton values, e.g. when we show both an OK button |
| 42 // and a cancel button, it should return (BUTTON_OK | BUTTON_CANCEL). (This is | 37 // and a cancel button, it should return (BUTTON_OK | BUTTON_CANCEL). (This is |
| 43 // the default implementation.) | 38 // the default implementation.) |
| 44 virtual int GetButtons() const; | 39 virtual int GetButtons() const; |
| 45 | 40 |
| 46 // Return the label for the specified button. The default implementation | 41 // Return the label for the specified button. The default implementation |
| 47 // returns "OK" for the OK button and "Cancel" for the Cancel button. | 42 // returns "OK" for the OK button and "Cancel" for the Cancel button. |
| 48 virtual base::string16 GetButtonLabel(BubbleButton button) const; | 43 virtual base::string16 GetButtonLabel(BubbleButton button) const; |
| 49 | 44 |
| 50 // Called when the OK button is pressed. | 45 // Called when the OK button is pressed. |
| 51 virtual void Accept(); | 46 virtual void Accept(); |
| 52 | 47 |
| 53 // Called when the Cancel button is pressed. | 48 // Called when the Cancel button is pressed. |
| 54 virtual void Cancel(); | 49 virtual void Cancel(); |
| 55 | 50 |
| 56 // Returns the text of the link to be displayed, if any. Otherwise returns | 51 // Returns the text of the link to be displayed, if any. Otherwise returns |
| 57 // and empty string. | 52 // and empty string. |
| 58 virtual base::string16 GetLinkText() const; | 53 virtual base::string16 GetLinkText() const; |
| 59 | 54 |
| 60 // Called when the Link is clicked. | 55 // Called when the Link is clicked. |
| 61 virtual void LinkClicked(); | 56 virtual void LinkClicked(); |
| 62 | 57 |
| 63 private: | 58 private: |
| 64 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleModel); | 59 DISALLOW_COPY_AND_ASSIGN(ConfirmBubbleModel); |
| 65 }; | 60 }; |
| 66 | 61 |
| 67 #endif // CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ | 62 #endif // CHROME_BROWSER_UI_CONFIRM_BUBBLE_MODEL_H_ |
| OLD | NEW |