OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ | 5 #ifndef COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ |
6 #define COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ | 6 #define COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
| 10 #include "base/macros.h" |
10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
11 #include "components/bubble/bubble_close_reason.h" | 12 #include "components/bubble/bubble_close_reason.h" |
12 | 13 |
13 class BubbleUi; | 14 class BubbleUi; |
14 | 15 |
15 // Inherit from this class to define a bubble. A bubble is a small transient UI | 16 // Inherit from this class to define a bubble. A bubble is a small transient UI |
16 // surface anchored to a parent window. Most bubbles are dismissed when they | 17 // surface anchored to a parent window. Most bubbles are dismissed when they |
17 // lose focus. | 18 // lose focus. |
18 class BubbleDelegate { | 19 class BubbleDelegate { |
19 public: | 20 public: |
(...skipping 18 matching lines...) Expand all Loading... |
38 virtual bool UpdateBubbleUi(BubbleUi* bubble_ui); | 39 virtual bool UpdateBubbleUi(BubbleUi* bubble_ui); |
39 | 40 |
40 // Used to identify a bubble for collecting metrics. | 41 // Used to identify a bubble for collecting metrics. |
41 virtual std::string GetName() const = 0; | 42 virtual std::string GetName() const = 0; |
42 | 43 |
43 private: | 44 private: |
44 DISALLOW_COPY_AND_ASSIGN(BubbleDelegate); | 45 DISALLOW_COPY_AND_ASSIGN(BubbleDelegate); |
45 }; | 46 }; |
46 | 47 |
47 #endif // COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ | 48 #endif // COMPONENTS_BUBBLE_BUBBLE_DELEGATE_H_ |
OLD | NEW |