OLD | NEW |
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/constrained_window_views.h" | 5 #include "chrome/browser/ui/views/constrained_window_views.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/utf_string_conversions.h" | 10 #include "base/utf_string_conversions.h" |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
744 DCHECK(enable_chrome_style_); | 744 DCHECK(enable_chrome_style_); |
745 ConstrainedWindowTabHelperDelegate* tab_helper_delegate = | 745 ConstrainedWindowTabHelperDelegate* tab_helper_delegate = |
746 ConstrainedWindowTabHelper::FromWebContents(web_contents_)->delegate(); | 746 ConstrainedWindowTabHelper::FromWebContents(web_contents_)->delegate(); |
747 gfx::Point point; | 747 gfx::Point point; |
748 if (!tab_helper_delegate || | 748 if (!tab_helper_delegate || |
749 !tab_helper_delegate->GetConstrainedWindowTopCenter(&point)) { | 749 !tab_helper_delegate->GetConstrainedWindowTopCenter(&point)) { |
750 Widget::CenterWindow(size); | 750 Widget::CenterWindow(size); |
751 return; | 751 return; |
752 } | 752 } |
753 | 753 |
754 SetBounds(gfx::Rect(point - gfx::Point(size.width() / 2, 0), size)); | 754 SetBounds(gfx::Rect(point - gfx::Vector2d(size.width() / 2, 0), size)); |
755 } | 755 } |
OLD | NEW |