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

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

Issue 882873002: Close the permission bubble when use clicks 'esc' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | no next file » | 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/website_settings/permissions_bubble_view.h" 5 #include "chrome/browser/ui/views/website_settings/permissions_bubble_view.h"
6 6
7 #include "base/strings/string16.h" 7 #include "base/strings/string16.h"
8 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h" 8 #include "chrome/browser/ui/views/website_settings/permission_selector_view.h"
9 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h" 9 #include "chrome/browser/ui/views/website_settings/permission_selector_view_obse rver.h"
10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h" 10 #include "chrome/browser/ui/website_settings/permission_bubble_request.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 bool customization_mode) 219 bool customization_mode)
220 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_LEFT), 220 : views::BubbleDelegateView(anchor, views::BubbleBorder::TOP_LEFT),
221 owner_(owner), 221 owner_(owner),
222 allow_(NULL), 222 allow_(NULL),
223 deny_(NULL), 223 deny_(NULL),
224 allow_combobox_(NULL) { 224 allow_combobox_(NULL) {
225 DCHECK(!requests.empty()); 225 DCHECK(!requests.empty());
226 226
227 RemoveAllChildViews(true); 227 RemoveAllChildViews(true);
228 customize_comboboxes_.clear(); 228 customize_comboboxes_.clear();
229 set_close_on_esc(false); 229 set_close_on_esc(true);
230 set_close_on_deactivate(false); 230 set_close_on_deactivate(false);
231 231
232 SetLayoutManager(new views::BoxLayout( 232 SetLayoutManager(new views::BoxLayout(
233 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing)); 233 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing));
234 234
235 // TODO(gbillock): support other languages than English. 235 // TODO(gbillock): support other languages than English.
236 hostname_ = net::FormatUrl(requests[0]->GetRequestingHostname(), 236 hostname_ = net::FormatUrl(requests[0]->GetRequestingHostname(),
237 "en", 237 "en",
238 net::kFormatUrlOmitUsernamePassword | 238 net::kFormatUrlOmitUsernamePassword |
239 net::kFormatUrlOmitTrailingSlashOnBareHostname, 239 net::kFormatUrlOmitTrailingSlashOnBareHostname,
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
479 479
480 void PermissionBubbleViewViews::Deny() { 480 void PermissionBubbleViewViews::Deny() {
481 if (delegate_) 481 if (delegate_)
482 delegate_->Deny(); 482 delegate_->Deny();
483 } 483 }
484 484
485 void PermissionBubbleViewViews::SetCustomizationMode() { 485 void PermissionBubbleViewViews::SetCustomizationMode() {
486 if (delegate_) 486 if (delegate_)
487 delegate_->SetCustomizationMode(); 487 delegate_->SetCustomizationMode();
488 } 488 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698