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

Side by Side Diff: chrome/browser/ui/views/exclusive_access_bubble_views.cc

Issue 962453002: Update permission bubble anchor when omnibar is hidden (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Apply Feedback Created 5 years, 9 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/exclusive_access_bubble_views.h" 5 #include "chrome/browser/ui/views/exclusive_access_bubble_views.h"
6 6
7 #include "base/message_loop/message_loop.h" 7 #include "base/message_loop/message_loop.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 StopWatchingMouse(); 347 StopWatchingMouse();
348 348
349 UpdateMouseWatcher(); 349 UpdateMouseWatcher();
350 } 350 }
351 351
352 void ExclusiveAccessBubbleViews::RepositionIfVisible() { 352 void ExclusiveAccessBubbleViews::RepositionIfVisible() {
353 if (popup_->IsVisible()) 353 if (popup_->IsVisible())
354 UpdateBounds(); 354 UpdateBounds();
355 } 355 }
356 356
357 views::View* ExclusiveAccessBubbleViews::GetView() {
358 return view_;
359 }
360
357 void ExclusiveAccessBubbleViews::UpdateMouseWatcher() { 361 void ExclusiveAccessBubbleViews::UpdateMouseWatcher() {
358 bool should_watch_mouse = false; 362 bool should_watch_mouse = false;
359 if (popup_->IsVisible()) 363 if (popup_->IsVisible())
360 should_watch_mouse = 364 should_watch_mouse =
361 !exclusive_access_bubble::ShowButtonsForType(bubble_type_); 365 !exclusive_access_bubble::ShowButtonsForType(bubble_type_);
362 else 366 else
363 should_watch_mouse = CanMouseTriggerSlideIn(); 367 should_watch_mouse = CanMouseTriggerSlideIn();
364 368
365 if (should_watch_mouse == IsWatchingMouse()) 369 if (should_watch_mouse == IsWatchingMouse())
366 return; 370 return;
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 const content::NotificationDetails& details) { 518 const content::NotificationDetails& details) {
515 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); 519 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type);
516 UpdateForImmersiveState(); 520 UpdateForImmersiveState();
517 } 521 }
518 522
519 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged( 523 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged(
520 views::Widget* widget, 524 views::Widget* widget,
521 bool visible) { 525 bool visible) {
522 UpdateMouseWatcher(); 526 UpdateMouseWatcher();
523 } 527 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698