| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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/views/browser_bubble.h" | 5 #include "chrome/browser/views/browser_bubble.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "chrome/browser/views/frame/browser_view.h" | 8 #include "chrome/browser/views/frame/browser_view.h" |
| 9 #include "views/widget/root_view.h" | 9 #include "views/widget/root_view.h" |
| 10 #include "views/window/window.h" | 10 #include "views/window/window.h" |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 88 void BrowserBubble::Reposition() { | 88 void BrowserBubble::Reposition() { |
| 89 gfx::Point top_left; | 89 gfx::Point top_left; |
| 90 views::View::ConvertPointToScreen(frame_->GetRootView(), &top_left); | 90 views::View::ConvertPointToScreen(frame_->GetRootView(), &top_left); |
| 91 MovePopup(top_left.x() + bounds_.x(), | 91 MovePopup(top_left.x() + bounds_.x(), |
| 92 top_left.y() + bounds_.y(), | 92 top_left.y() + bounds_.y(), |
| 93 bounds_.width(), | 93 bounds_.width(), |
| 94 bounds_.height()); | 94 bounds_.height()); |
| 95 } | 95 } |
| 96 | 96 |
| 97 void BrowserBubble::ResizeToView() { | 97 void BrowserBubble::ResizeToView() { |
| 98 gfx::Size size = view_->GetPreferredSize(); | 98 SetBounds(bounds_.x(), bounds_.y(), view_->width(), view_->height()); |
| 99 SetBounds(bounds_.x(), bounds_.y(), size.width(), size.height()); | |
| 100 } | 99 } |
| OLD | NEW |