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/browser.h" | |
|
msw
2015/03/17 21:13:15
nit: forward declare Browser for this header, incl
hcarmona
2015/03/18 18:00:05
Done.
| |
| 13 #include "chrome/browser/ui/views/frame/browser_view.h" | |
|
msw
2015/03/17 21:13:15
nit: forward declare BrowserView for this header,
hcarmona
2015/03/18 18:00:05
Forward declaration no longer needed.
| |
| 12 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" | 14 #include "chrome/browser/ui/website_settings/permission_bubble_view.h" |
| 15 #include "ui/views/bubble/bubble_border.h" | |
| 13 | 16 |
| 14 namespace views { | 17 namespace views { |
| 15 class View; | 18 class View; |
| 16 } | 19 } |
| 17 | 20 |
| 18 class PermissionsBubbleDelegateView; | 21 class PermissionsBubbleDelegateView; |
| 19 | 22 |
| 20 class PermissionBubbleViewViews : public PermissionBubbleView { | 23 class PermissionBubbleViewViews : public PermissionBubbleView { |
| 21 public: | 24 public: |
| 22 PermissionBubbleViewViews(views::View* anchor_view, | 25 explicit PermissionBubbleViewViews(Browser* browser, |
|
msw
2015/03/17 21:13:15
The explicit keyword is only needed for constructo
hcarmona
2015/03/18 18:00:05
Done.
| |
| 23 const std::string& languages); | 26 BrowserView* browser_view); |
| 24 ~PermissionBubbleViewViews() override; | 27 ~PermissionBubbleViewViews() override; |
| 25 | 28 |
| 29 views::View* GetAnchorView(); | |
|
msw
2015/03/17 21:13:15
These three functions should be private, since the
hcarmona
2015/03/18 18:00:05
Done.
| |
| 30 views::BubbleBorder::Arrow GetAnchorArrow(); | |
| 31 void UpdateAnchorPosition(); | |
| 32 | |
| 26 // PermissionBubbleView: | 33 // PermissionBubbleView: |
| 27 void SetDelegate(Delegate* delegate) override; | 34 void SetDelegate(Delegate* delegate) override; |
| 28 void Show(const std::vector<PermissionBubbleRequest*>& requests, | 35 void Show(const std::vector<PermissionBubbleRequest*>& requests, |
| 29 const std::vector<bool>& accept_state) override; | 36 const std::vector<bool>& accept_state) override; |
| 30 bool CanAcceptRequestUpdate() override; | 37 bool CanAcceptRequestUpdate() override; |
| 31 void Hide() override; | 38 void Hide() override; |
| 32 bool IsVisible() override; | 39 bool IsVisible() override; |
| 33 | 40 |
| 34 void Closing(); | 41 void Closing(); |
| 35 void Toggle(int index, bool value); | 42 void Toggle(int index, bool value); |
| 36 void Accept(); | 43 void Accept(); |
| 37 void Deny(); | 44 void Deny(); |
| 38 | 45 |
| 39 private: | 46 private: |
| 40 views::View* anchor_view_; | 47 Browser* browser_; |
| 48 BrowserView* browser_view_; | |
| 41 Delegate* delegate_; | 49 Delegate* delegate_; |
| 42 PermissionsBubbleDelegateView* bubble_delegate_; | 50 PermissionsBubbleDelegateView* bubble_delegate_; |
| 43 const std::string languages_; | 51 const std::string languages_; |
| 44 | 52 |
| 45 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); | 53 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); |
| 46 }; | 54 }; |
| 47 | 55 |
| 48 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ | 56 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ |
| OLD | NEW |