Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" | 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| 13 #include "ui/views/bubble/bubble_border.h" | 13 #include "ui/views/bubble/bubble_border.h" |
| 14 | 14 |
| 15 namespace views { | 15 namespace views { |
| 16 class View; | 16 class View; |
| 17 } | 17 } |
| 18 | 18 |
| 19 class Browser; | |
| 20 class PermissionsBubbleDelegateView; | 19 class PermissionsBubbleDelegateView; |
| 21 | 20 |
| 22 class PermissionBubbleViewViews : public PermissionBubbleView { | 21 class PermissionBubbleViewViews : public PermissionBubbleView { |
| 23 public: | 22 public: |
| 24 explicit PermissionBubbleViewViews(Browser* browser); | 23 PermissionBubbleViewViews( |
| 24 PermissionBubbleDelegate* delegate, Browser* browser); | |
| 25 ~PermissionBubbleViewViews() override; | 25 ~PermissionBubbleViewViews() override; |
| 26 | 26 |
| 27 // BubbleUI | |
| 28 void Show() override; | |
| 29 void Hide() override; | |
| 30 void UpdateAnchorPosition() override; | |
| 31 | |
| 27 // PermissionBubbleView: | 32 // PermissionBubbleView: |
| 28 void SetDelegate(Delegate* delegate) override; | |
| 29 void Show(const std::vector<PermissionBubbleRequest*>& requests, | |
| 30 const std::vector<bool>& accept_state) override; | |
| 31 bool CanAcceptRequestUpdate() override; | 33 bool CanAcceptRequestUpdate() override; |
| 32 void Hide() override; | |
| 33 bool IsVisible() override; | |
| 34 void UpdateAnchorPosition() override; | |
| 35 gfx::NativeWindow GetNativeWindow() override; | |
| 36 | 34 |
| 35 // Callbacks from UI: | |
| 37 void Closing(); | 36 void Closing(); |
| 38 void Toggle(int index, bool value); | 37 void Toggle(int index, bool value); |
| 39 void Accept(); | 38 void Accept(); |
| 40 void Deny(); | 39 void Deny(); |
| 41 | 40 |
| 42 private: | 41 private: |
| 43 views::View* GetAnchorView(); | 42 views::View* GetAnchorView(); |
| 44 views::BubbleBorder::Arrow GetAnchorArrow(); | 43 views::BubbleBorder::Arrow GetAnchorArrow(); |
| 45 | 44 |
| 45 PermissionBubbleDelegate* delegate_; | |
|
please use gerrit instead
2015/08/07 23:02:27
// owned by BubbleManager.
(the view is owned by
hcarmona
2015/08/11 02:35:45
Done.
| |
| 46 Browser* browser_; | 46 Browser* browser_; |
| 47 Delegate* delegate_; | |
| 48 PermissionsBubbleDelegateView* bubble_delegate_; | 47 PermissionsBubbleDelegateView* bubble_delegate_; |
| 49 | 48 |
| 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 49 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 51 }; | 50 }; |
| 52 | 51 |
| 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 52 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |