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

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

Issue 2258763002: Add a feature-controlled persistence checkbox to geolocation prompts on desktop Views platforms. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-infobardelegate-clean
Patch Set: Address comments Created 4 years, 3 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_PERMISSION_PROMPT_IMPL_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_
6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ 6 #define CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
(...skipping 19 matching lines...) Expand all
30 void SetDelegate(Delegate* delegate) override; 30 void SetDelegate(Delegate* delegate) override;
31 void Show(const std::vector<PermissionRequest*>& requests, 31 void Show(const std::vector<PermissionRequest*>& requests,
32 const std::vector<bool>& accept_state) override; 32 const std::vector<bool>& accept_state) override;
33 bool CanAcceptRequestUpdate() override; 33 bool CanAcceptRequestUpdate() override;
34 void Hide() override; 34 void Hide() override;
35 bool IsVisible() override; 35 bool IsVisible() override;
36 void UpdateAnchorPosition() override; 36 void UpdateAnchorPosition() override;
37 gfx::NativeWindow GetNativeWindow() override; 37 gfx::NativeWindow GetNativeWindow() override;
38 38
39 void Closing(); 39 void Closing();
40 void Toggle(int index, bool value); 40 void ToggleAccept(int index, bool value);
41 void TogglePersist(bool value);
41 void Accept(); 42 void Accept();
42 void Deny(); 43 void Deny();
43 44
44 private: 45 private:
45 // These three functions have separate implementations for Views-based and 46 // These three functions have separate implementations for Views-based and
46 // Cocoa-based browsers, to allow this bubble to be used in either. 47 // Cocoa-based browsers, to allow this bubble to be used in either.
47 48
48 // Returns the view to anchor the permission bubble to. May be null. 49 // Returns the view to anchor the permission bubble to. May be null.
49 views::View* GetAnchorView(); 50 views::View* GetAnchorView();
50 // Returns the anchor point to anchor the permission bubble to, as a fallback. 51 // Returns the anchor point to anchor the permission bubble to, as a fallback.
51 // Only used if GetAnchorView() returns nullptr. 52 // Only used if GetAnchorView() returns nullptr.
52 gfx::Point GetAnchorPoint(); 53 gfx::Point GetAnchorPoint();
53 // Returns the type of arrow to display on the permission bubble. 54 // Returns the type of arrow to display on the permission bubble.
54 views::BubbleBorder::Arrow GetAnchorArrow(); 55 views::BubbleBorder::Arrow GetAnchorArrow();
55 56
56 Browser* browser_; 57 Browser* browser_;
57 Delegate* delegate_; 58 Delegate* delegate_;
58 PermissionsBubbleDialogDelegateView* bubble_delegate_; 59 PermissionsBubbleDialogDelegateView* bubble_delegate_;
59 60
60 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl); 61 DISALLOW_COPY_AND_ASSIGN(PermissionPromptImpl);
61 }; 62 };
62 63
63 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_ 64 #endif // CHROME_BROWSER_UI_VIEWS_WEBSITE_SETTINGS_PERMISSION_PROMPT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698