Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(837)

Side by Side Diff: chrome/browser/ui/views/website_settings/permissions_bubble_view.h

Issue 962453002: Update permission bubble anchor when omnibar is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply Feedback Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 14
14 namespace views { 15 namespace views {
15 class View; 16 class View;
16 } 17 }
17 18
19 class Browser;
18 class PermissionsBubbleDelegateView; 20 class PermissionsBubbleDelegateView;
19 21
20 class PermissionBubbleViewViews : public PermissionBubbleView { 22 class PermissionBubbleViewViews : public PermissionBubbleView {
21 public: 23 public:
22 PermissionBubbleViewViews(views::View* anchor_view, 24 explicit PermissionBubbleViewViews(Browser* browser);
23 const std::string& languages);
24 ~PermissionBubbleViewViews() override; 25 ~PermissionBubbleViewViews() override;
25 26
27 void UpdateAnchorPosition();
28
26 // PermissionBubbleView: 29 // PermissionBubbleView:
27 void SetDelegate(Delegate* delegate) override; 30 void SetDelegate(Delegate* delegate) override;
28 void Show(const std::vector<PermissionBubbleRequest*>& requests, 31 void Show(const std::vector<PermissionBubbleRequest*>& requests,
29 const std::vector<bool>& accept_state) override; 32 const std::vector<bool>& accept_state) override;
30 bool CanAcceptRequestUpdate() override; 33 bool CanAcceptRequestUpdate() override;
31 void Hide() override; 34 void Hide() override;
32 bool IsVisible() override; 35 bool IsVisible() override;
33 36
34 void Closing(); 37 void Closing();
35 void Toggle(int index, bool value); 38 void Toggle(int index, bool value);
36 void Accept(); 39 void Accept();
37 void Deny(); 40 void Deny();
38 41
39 private: 42 private:
40 views::View* anchor_view_; 43 Browser* browser_;
41 Delegate* delegate_; 44 Delegate* delegate_;
42 PermissionsBubbleDelegateView* bubble_delegate_; 45 PermissionsBubbleDelegateView* bubble_delegate_;
43 const std::string languages_; 46
47 views::View* GetAnchorView_();
msw 2015/03/18 18:30:09 List functions before member variables, remove the
hcarmona 2015/03/18 23:50:39 Done.
48 views::BubbleBorder::Arrow GetAnchorArrow_();
44 49
45 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews); 50 DISALLOW_COPY_AND_ASSIGN(PermissionBubbleViewViews);
46 }; 51 };
47 52
48 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_ 53 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSIONS_BUBBLE_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698