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

Side by Side Diff: chrome/browser/ui/views/permission_bubble/permission_prompt_impl.cc

Issue 2908073003: Ensure that mask layer is of the same size as the owning layer. (Closed)
Patch Set: style change Created 3 years, 6 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
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h" 5 #include "chrome/browser/ui/views/permission_bubble/permission_prompt_impl.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/memory/ptr_util.h" 10 #include "base/memory/ptr_util.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 // View implementation for the permissions bubble. 48 // View implementation for the permissions bubble.
49 class PermissionsBubbleDialogDelegateView 49 class PermissionsBubbleDialogDelegateView
50 : public views::BubbleDialogDelegateView { 50 : public views::BubbleDialogDelegateView {
51 public: 51 public:
52 PermissionsBubbleDialogDelegateView( 52 PermissionsBubbleDialogDelegateView(
53 PermissionPromptImpl* owner, 53 PermissionPromptImpl* owner,
54 const std::vector<PermissionRequest*>& requests); 54 const std::vector<PermissionRequest*>& requests);
55 ~PermissionsBubbleDialogDelegateView() override; 55 ~PermissionsBubbleDialogDelegateView() override;
56 56
57 void CloseBubble(); 57 void CloseBubble();
58 void SizeToContents();
59 58
60 // BubbleDialogDelegateView: 59 // BubbleDialogDelegateView:
61 bool ShouldShowCloseButton() const override; 60 bool ShouldShowCloseButton() const override;
62 const gfx::FontList& GetTitleFontList() const override; 61 const gfx::FontList& GetTitleFontList() const override;
63 base::string16 GetWindowTitle() const override; 62 base::string16 GetWindowTitle() const override;
64 void OnWidgetDestroying(views::Widget* widget) override; 63 void OnWidgetDestroying(views::Widget* widget) override;
65 void GetAccessibleNodeData(ui::AXNodeData* node_data) override; 64 void GetAccessibleNodeData(ui::AXNodeData* node_data) override;
66 bool Cancel() override; 65 bool Cancel() override;
67 bool Accept() override; 66 bool Accept() override;
68 bool Close() override; 67 bool Close() override;
69 int GetDefaultDialogButton() const override; 68 int GetDefaultDialogButton() const override;
70 int GetDialogButtons() const override; 69 int GetDialogButtons() const override;
71 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override; 70 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
71 void SizeToContents() override;
72 72
73 // Updates the anchor's arrow and view. Also repositions the bubble so it's 73 // Updates the anchor's arrow and view. Also repositions the bubble so it's
74 // displayed in the correct location. 74 // displayed in the correct location.
75 void UpdateAnchor(views::View* anchor_view, 75 void UpdateAnchor(views::View* anchor_view,
76 const gfx::Point& anchor_point, 76 const gfx::Point& anchor_point,
77 views::BubbleBorder::Arrow anchor_arrow); 77 views::BubbleBorder::Arrow anchor_arrow);
78 78
79 private: 79 private:
80 PermissionPromptImpl* owner_; 80 PermissionPromptImpl* owner_;
81 base::string16 display_origin_; 81 base::string16 display_origin_;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
334 334
335 void PermissionPromptImpl::Accept() { 335 void PermissionPromptImpl::Accept() {
336 if (delegate_) 336 if (delegate_)
337 delegate_->Accept(); 337 delegate_->Accept();
338 } 338 }
339 339
340 void PermissionPromptImpl::Deny() { 340 void PermissionPromptImpl::Deny() {
341 if (delegate_) 341 if (delegate_)
342 delegate_->Deny(); 342 delegate_->Deny();
343 } 343 }
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest.cc ('k') | ui/views/bubble/bubble_dialog_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698