Index: chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h |
diff --git a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h |
index d5c9093c89369f37ad3d84de0ace426c9dea28c8..07b18263b16b67d2cad4c8d61e828f7418be1ea2 100644 |
--- a/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h |
+++ b/chrome/browser/ui/cocoa/website_settings/chooser_bubble_ui_cocoa.h |
@@ -7,21 +7,23 @@ |
#import <Cocoa/Cocoa.h> |
+#include <memory> |
+ |
#include "base/macros.h" |
#include "components/bubble/bubble_ui.h" |
-#include "components/chooser_controller/chooser_controller.h" |
class Browser; |
@class ChooserBubbleUiController; |
+class ChooserController; |
// ChooserBubbleUiCocoa implements a chooser-based permission model. |
// It uses |NSTableView| to show a list of options for user to grant |
// permission. It can be used by the WebUSB or WebBluetooth APIs. |
// It is owned by the BubbleController, which is owned by the BubbleManager. |
-class ChooserBubbleUiCocoa : public BubbleUi, |
- public ChooserController::Observer { |
+class ChooserBubbleUiCocoa : public BubbleUi { |
public: |
- ChooserBubbleUiCocoa(Browser* browser, ChooserController* chooser_controller); |
+ ChooserBubbleUiCocoa(Browser* browser, |
+ std::unique_ptr<ChooserController> chooser_controller); |
~ChooserBubbleUiCocoa() override; |
// BubbleUi: |
@@ -29,17 +31,14 @@ class ChooserBubbleUiCocoa : public BubbleUi, |
void Close() override; |
void UpdateAnchorPosition() override; |
- // ChooserController::Observer: |
- void OnOptionsInitialized() override; |
- void OnOptionAdded(size_t index) override; |
- void OnOptionRemoved(size_t index) override; |
- |
// Called when |chooser_bubble_ui_controller_| is closing. |
void OnBubbleClosing(); |
private: |
- Browser* browser_; // Weak. |
- ChooserController* chooser_controller_; // Weak. |
+ Browser* browser_; // Weak. |
+ // |chooser_controller_| is not owned by this class. |
+ // It is owned by ChooserContentViewCocoa. |
+ std::unique_ptr<ChooserController> chooser_controller_; |
Reilly Grant (use Gerrit)
2016/06/22 00:01:32
The comment is confusing because it seems to be di
juncai
2016/06/22 01:17:45
Done.
|
// Cocoa-side chooser bubble UI controller. Weak, as it will close itself. |
ChooserBubbleUiController* chooser_bubble_ui_controller_; |