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

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

Issue 1608733002: Remove ui/gfx/screen_type_delegate.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@metro-mode-4
Patch Set: and another rebase Created 4 years, 11 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 <utility> 7 #include <utility>
8 8
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 int total_height = size.height() + desired_top; 605 int total_height = size.height() + desired_top;
606 int popup_bottom = animation_->CurrentValueBetween(total_height, 0); 606 int popup_bottom = animation_->CurrentValueBetween(total_height, 0);
607 int y_offset = std::min(popup_bottom, desired_top); 607 int y_offset = std::min(popup_bottom, desired_top);
608 size.set_height(size.height() - popup_bottom + y_offset); 608 size.set_height(size.height() - popup_bottom + y_offset);
609 y -= y_offset; 609 y -= y_offset;
610 } 610 }
611 return gfx::Rect(gfx::Point(x, y), size); 611 return gfx::Rect(gfx::Point(x, y), size);
612 } 612 }
613 613
614 gfx::Point ExclusiveAccessBubbleViews::GetCursorScreenPoint() { 614 gfx::Point ExclusiveAccessBubbleViews::GetCursorScreenPoint() {
615 gfx::Point cursor_pos = 615 gfx::Point cursor_pos = gfx::Screen::GetScreen()->GetCursorScreenPoint();
616 gfx::Screen::GetScreenFor(
617 bubble_view_context_->GetBubbleAssociatedWidget()->GetNativeView())
618 ->GetCursorScreenPoint();
619 views::View::ConvertPointFromScreen(GetBrowserRootView(), &cursor_pos); 616 views::View::ConvertPointFromScreen(GetBrowserRootView(), &cursor_pos);
620 return cursor_pos; 617 return cursor_pos;
621 } 618 }
622 619
623 bool ExclusiveAccessBubbleViews::WindowContainsPoint(gfx::Point pos) { 620 bool ExclusiveAccessBubbleViews::WindowContainsPoint(gfx::Point pos) {
624 return GetBrowserRootView()->HitTestPoint(pos); 621 return GetBrowserRootView()->HitTestPoint(pos);
625 } 622 }
626 623
627 bool ExclusiveAccessBubbleViews::IsWindowActive() { 624 bool ExclusiveAccessBubbleViews::IsWindowActive() {
628 return bubble_view_context_->GetBubbleAssociatedWidget()->IsActive(); 625 return bubble_view_context_->GetBubbleAssociatedWidget()->IsActive();
(...skipping 23 matching lines...) Expand all
652 const content::NotificationDetails& details) { 649 const content::NotificationDetails& details) {
653 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type); 650 DCHECK_EQ(chrome::NOTIFICATION_FULLSCREEN_CHANGED, type);
654 UpdateForImmersiveState(); 651 UpdateForImmersiveState();
655 } 652 }
656 653
657 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged( 654 void ExclusiveAccessBubbleViews::OnWidgetVisibilityChanged(
658 views::Widget* widget, 655 views::Widget* widget,
659 bool visible) { 656 bool visible) {
660 UpdateMouseWatcher(); 657 UpdateMouseWatcher();
661 } 658 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.cc ('k') | chrome/browser/ui/views/extensions/extension_dialog.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698