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

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

Issue 251373003: Set PermissionBubbleView to move with the anchor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 8 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/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 owner_(owner), 217 owner_(owner),
218 allow_(NULL), 218 allow_(NULL),
219 deny_(NULL), 219 deny_(NULL),
220 allow_combobox_(NULL) { 220 allow_combobox_(NULL) {
221 DCHECK(!requests.empty()); 221 DCHECK(!requests.empty());
222 222
223 RemoveAllChildViews(true); 223 RemoveAllChildViews(true);
224 customize_comboboxes_.clear(); 224 customize_comboboxes_.clear();
225 set_close_on_esc(false); 225 set_close_on_esc(false);
226 set_close_on_deactivate(false); 226 set_close_on_deactivate(false);
227 set_move_with_anchor(true);
227 228
228 SetLayoutManager(new views::BoxLayout( 229 SetLayoutManager(new views::BoxLayout(
229 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing)); 230 views::BoxLayout::kVertical, kBubbleOuterMargin, 0, kItemMajorSpacing));
230 231
231 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 232 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
232 233
233 // TODO(gbillock): account for different requests from different hosts. 234 // TODO(gbillock): account for different requests from different hosts.
234 hostname_ = requests[0]->GetRequestingHostname().host(); 235 hostname_ = requests[0]->GetRequestingHostname().host();
235 236
236 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance(); 237 ui::ResourceBundle& bundle = ui::ResourceBundle::GetSharedInstance();
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
465 466
466 void PermissionBubbleViewViews::Deny() { 467 void PermissionBubbleViewViews::Deny() {
467 if (delegate_) 468 if (delegate_)
468 delegate_->Deny(); 469 delegate_->Deny();
469 } 470 }
470 471
471 void PermissionBubbleViewViews::SetCustomizationMode() { 472 void PermissionBubbleViewViews::SetCustomizationMode() {
472 if (delegate_) 473 if (delegate_)
473 delegate_->SetCustomizationMode(); 474 delegate_->SetCustomizationMode();
474 } 475 }
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