| 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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 DCHECK(enable_chrome_style_); | 736 DCHECK(enable_chrome_style_); |
| 737 ConstrainedWindowTabHelperDelegate* tab_helper_delegate = | 737 ConstrainedWindowTabHelperDelegate* tab_helper_delegate = |
| 738 ConstrainedWindowTabHelper::FromWebContents(web_contents_)->delegate(); | 738 ConstrainedWindowTabHelper::FromWebContents(web_contents_)->delegate(); |
| 739 gfx::Point point; | 739 gfx::Point point; |
| 740 if (!tab_helper_delegate || | 740 if (!tab_helper_delegate || |
| 741 !tab_helper_delegate->GetConstrainedWindowTopCenter(&point)) { | 741 !tab_helper_delegate->GetConstrainedWindowTopCenter(&point)) { |
| 742 Widget::CenterWindow(size); | 742 Widget::CenterWindow(size); |
| 743 return; | 743 return; |
| 744 } | 744 } |
| 745 | 745 |
| 746 SetBounds(gfx::Rect(point - gfx::Point(size.width() / 2, 0), size)); | 746 SetBounds(gfx::Rect(point - gfx::Vector2d(size.width() / 2, 0), size)); |
| 747 } | 747 } |
| OLD | NEW |