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

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

Issue 2069733002: MD - Use real comboboxes in website settings popup. Hide borders (but (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add comment 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!";
136 SetText(model_->GetLabelAt(model_->GetIndexOfCommandId(permission.setting))); 135 SetText(model_->GetLabelAt(model_->GetIndexOfCommandId(permission.setting)));
137 SizeToPreferredSize(); 136 SizeToPreferredSize();
138 137
139 listener_->PermissionSelectionChanged( 138 listener_->PermissionSelectionChanged(
140 index_, permission.setting == CONTENT_SETTING_ALLOW); 139 index_, permission.setting == CONTENT_SETTING_ALLOW);
141 } 140 }
142 141
143 /////////////////////////////////////////////////////////////////////////////// 142 ///////////////////////////////////////////////////////////////////////////////
144 // View implementation for the permissions bubble. 143 // View implementation for the permissions bubble.
145 class PermissionsBubbleDialogDelegateView 144 class PermissionsBubbleDialogDelegateView
(...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 451
453 void PermissionBubbleViewViews::Accept() { 452 void PermissionBubbleViewViews::Accept() {
454 if (delegate_) 453 if (delegate_)
455 delegate_->Accept(); 454 delegate_->Accept();
456 } 455 }
457 456
458 void PermissionBubbleViewViews::Deny() { 457 void PermissionBubbleViewViews::Deny() {
459 if (delegate_) 458 if (delegate_)
460 delegate_->Deny(); 459 delegate_->Deny();
461 } 460 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/website_settings/permission_selector_view.cc ('k') | ui/views/controls/button/blue_button_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698