Chromium Code Reviews| Index: chrome/browser/ui/website_settings/chooser_bubble_delegate.h |
| diff --git a/chrome/browser/ui/website_settings/chooser_bubble_delegate.h b/chrome/browser/ui/website_settings/chooser_bubble_delegate.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..326246697c6d687b6473e2ffe48eefe324c9fe4a |
| --- /dev/null |
| +++ b/chrome/browser/ui/website_settings/chooser_bubble_delegate.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2015 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |
| +#define CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |
| + |
| +#include "base/macros.h" |
| +#include "chrome/browser/ui/website_settings/chooser_options.h" |
|
Jeffrey Yasskin
2015/12/05 01:13:53
You can forward declare this type.
juncai
2015/12/07 18:28:47
Done.
|
| +#include "components/bubble/bubble_delegate.h" |
| + |
| +class ChooserBubbleUiView; |
|
Jeffrey Yasskin
2015/12/05 01:13:53
Don't forward-declare classes that aren't used in
juncai
2015/12/07 18:28:47
Done.
|
| + |
| +class ChooserBubbleDelegate : public BubbleDelegate { |
|
Jeffrey Yasskin
2015/12/05 01:13:53
What does this class do? What's its lifetime?
juncai
2015/12/07 18:28:47
This class implements class BubbleDelegate:
https:
Jeffrey Yasskin
2015/12/07 23:57:54
Write down what kind of bubble this class defines.
|
| + public: |
| + ChooserBubbleDelegate(); |
| + ~ChooserBubbleDelegate() override; |
| + |
| + // BubbleDelegate: |
| + std::string GetName() const override; |
| + |
| + virtual void Select(int index) = 0; |
|
Jeffrey Yasskin
2015/12/05 01:13:53
When are these functions called? How do subclasses
juncai
2015/12/07 18:28:47
The ChooserBubbleUiView/ChooserBubbleUiCocoa class
Jeffrey Yasskin
2015/12/07 23:57:54
These functions need comments saying that, so futu
|
| + virtual void Cancel() = 0; |
| + virtual void Close() = 0; |
| + |
| + protected: |
| + scoped_ptr<ChooserOptions> chooser_options_; |
| + |
| + private: |
| + DISALLOW_COPY_AND_ASSIGN(ChooserBubbleDelegate); |
| +}; |
| + |
| +#endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |