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

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

Issue 2115433002: Ensure permission bubble is stacked below the exclusive access bubble. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@permission-bubble-detach-from-fullscreen
Patch Set: Fix Mac compile. Created 4 years, 5 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 387 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 // Set |parent_window| because some valid anchors can become hidden. 398 // Set |parent_window| because some valid anchors can become hidden.
399 bubble_delegate_->set_parent_window( 399 bubble_delegate_->set_parent_window(
400 platform_util::GetViewForWindow(browser_->window()->GetNativeWindow())); 400 platform_util::GetViewForWindow(browser_->window()->GetNativeWindow()));
401 401
402 views::BubbleDialogDelegateView::CreateBubble(bubble_delegate_)->Show(); 402 views::BubbleDialogDelegateView::CreateBubble(bubble_delegate_)->Show();
403 bubble_delegate_->SizeToContents(); 403 bubble_delegate_->SizeToContents();
404 404
405 bubble_delegate_->UpdateAnchor(GetAnchorView(), 405 bubble_delegate_->UpdateAnchor(GetAnchorView(),
406 GetAnchorPoint(), 406 GetAnchorPoint(),
407 GetAnchorArrow()); 407 GetAnchorArrow());
408
409 // Ensure this view does not cover over the exclusive access bubble.
410 gfx::NativeView exclusive_access_native_view = GetExclusiveAccessNativeView();
411 if (exclusive_access_native_view)
412 bubble_delegate_->GetWidget()->StackBelow(exclusive_access_native_view);
408 } 413 }
409 414
410 bool PermissionBubbleViewViews::CanAcceptRequestUpdate() { 415 bool PermissionBubbleViewViews::CanAcceptRequestUpdate() {
411 return !(bubble_delegate_ && bubble_delegate_->IsMouseHovered()); 416 return !(bubble_delegate_ && bubble_delegate_->IsMouseHovered());
412 } 417 }
413 418
414 void PermissionBubbleViewViews::Hide() { 419 void PermissionBubbleViewViews::Hide() {
415 if (bubble_delegate_) { 420 if (bubble_delegate_) {
416 bubble_delegate_->CloseBubble(); 421 bubble_delegate_->CloseBubble();
417 bubble_delegate_ = nullptr; 422 bubble_delegate_ = nullptr;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 457
453 void PermissionBubbleViewViews::Accept() { 458 void PermissionBubbleViewViews::Accept() {
454 if (delegate_) 459 if (delegate_)
455 delegate_->Accept(); 460 delegate_->Accept();
456 } 461 }
457 462
458 void PermissionBubbleViewViews::Deny() { 463 void PermissionBubbleViewViews::Deny() {
459 if (delegate_) 464 if (delegate_)
460 delegate_->Deny(); 465 delegate_->Deny();
461 } 466 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698