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