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

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

Issue 2011963002: PermissionSelectorView: use Combobox on MacViews builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Give up on SetPermissionInfo Created 4 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
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/website_settings/permissions_bubble_view.h" 5 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 gfx::Rect(p, gfx::Size()), 125 gfx::Rect(p, gfx::Size()),
126 views::MENU_ANCHOR_TOPLEFT, 126 views::MENU_ANCHOR_TOPLEFT,
127 ui::MENU_SOURCE_NONE) == 127 ui::MENU_SOURCE_NONE) ==
128 views::MenuRunner::MENU_DELETED) { 128 views::MenuRunner::MENU_DELETED) {
129 return; 129 return;
130 } 130 }
131 } 131 }
132 132
133 void PermissionCombobox::PermissionChanged( 133 void PermissionCombobox::PermissionChanged(
134 const WebsiteSettingsUI::PermissionInfo& permission) { 134 const WebsiteSettingsUI::PermissionInfo& permission) {
135 LOG(ERROR) << "PermissionChanged!";
135 SetText(model_->GetLabelAt(model_->GetIndexOfCommandId(permission.setting))); 136 SetText(model_->GetLabelAt(model_->GetIndexOfCommandId(permission.setting)));
136 SizeToPreferredSize(); 137 SizeToPreferredSize();
137 138
138 listener_->PermissionSelectionChanged( 139 listener_->PermissionSelectionChanged(
139 index_, permission.setting == CONTENT_SETTING_ALLOW); 140 index_, permission.setting == CONTENT_SETTING_ALLOW);
140 } 141 }
141 142
142 /////////////////////////////////////////////////////////////////////////////// 143 ///////////////////////////////////////////////////////////////////////////////
143 // View implementation for the permissions bubble. 144 // View implementation for the permissions bubble.
144 class PermissionsBubbleDialogDelegateView 145 class PermissionsBubbleDialogDelegateView
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
451 452
452 void PermissionBubbleViewViews::Accept() { 453 void PermissionBubbleViewViews::Accept() {
453 if (delegate_) 454 if (delegate_)
454 delegate_->Accept(); 455 delegate_->Accept();
455 } 456 }
456 457
457 void PermissionBubbleViewViews::Deny() { 458 void PermissionBubbleViewViews::Deny() {
458 if (delegate_) 459 if (delegate_)
459 delegate_->Deny(); 460 delegate_->Deny();
460 } 461 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698