| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |