| 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 CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "chrome/browser/ui/website_settings/chooser_options.h" | |
| 10 #include "components/bubble/bubble_delegate.h" | 9 #include "components/bubble/bubble_delegate.h" |
| 11 | 10 |
| 12 class ChooserBubbleUiView; | 11 class Browser; |
| 12 class ChooserOptions; |
| 13 | 13 |
| 14 class ChooserBubbleDelegate : public BubbleDelegate { | 14 class ChooserBubbleDelegate : public BubbleDelegate { |
| 15 public: | 15 public: |
| 16 ChooserBubbleDelegate(); | 16 explicit ChooserBubbleDelegate(Browser* browser); |
| 17 ~ChooserBubbleDelegate() override; | 17 ~ChooserBubbleDelegate() override; |
| 18 | 18 |
| 19 // BubbleDelegate: | 19 // BubbleDelegate: |
| 20 std::string GetName() const override; | 20 std::string GetName() const override; |
| 21 scoped_ptr<BubbleUi> BuildBubbleUi() override; |
| 22 |
| 23 static scoped_ptr<BubbleUi> CreateBubbleUi( |
| 24 Browser* browser, |
| 25 ChooserOptions* chooser_options, |
| 26 ChooserBubbleDelegate* chooser_bubble_delegate); |
| 21 | 27 |
| 22 virtual void Select(int index) = 0; | 28 virtual void Select(int index) = 0; |
| 23 virtual void Cancel() = 0; | 29 virtual void Cancel() = 0; |
| 24 virtual void Close() = 0; | 30 virtual void Close() = 0; |
| 25 | 31 |
| 26 protected: | 32 protected: |
| 27 scoped_ptr<ChooserOptions> chooser_options_; | 33 scoped_ptr<ChooserOptions> chooser_options_; |
| 28 | 34 |
| 29 private: | 35 private: |
| 36 Browser* browser_; |
| 30 DISALLOW_COPY_AND_ASSIGN(ChooserBubbleDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(ChooserBubbleDelegate); |
| 31 }; | 38 }; |
| 32 | 39 |
| 33 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ | 40 #endif // CHROME_BROWSER_UI_WEBSITE_SETTINGS_CHOOSER_BUBBLE_DELEGATE_H_ |
| OLD | NEW |