OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/browser_bubble.h" | 5 #include "chrome/browser/ui/views/browser_bubble.h" |
6 | 6 |
7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
8 #include "chrome/browser/ui/views/frame/browser_view.h" | 8 #include "chrome/browser/ui/views/frame/browser_view.h" |
9 #include "views/widget/widget.h" | 9 #include "ui/views/widget/widget.h" |
10 | 10 |
11 BrowserBubble::BrowserBubble(Browser* browser, | 11 BrowserBubble::BrowserBubble(Browser* browser, |
12 views::View* view, | 12 views::View* view, |
13 const gfx::Rect& relative_to, | 13 const gfx::Rect& relative_to, |
14 views::BubbleBorder::ArrowLocation arrow_location) | 14 views::BubbleBorder::ArrowLocation arrow_location) |
15 : frame_(NULL), | 15 : frame_(NULL), |
16 view_(view), | 16 view_(view), |
17 relative_to_(relative_to), | 17 relative_to_(relative_to), |
18 arrow_location_(arrow_location), | 18 arrow_location_(arrow_location), |
19 delegate_(NULL), | 19 delegate_(NULL), |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 gfx::Point relative_origin = window_bounds.origin(); | 121 gfx::Point relative_origin = window_bounds.origin(); |
122 views::View::ConvertPointToView(NULL, frame_->GetRootView(), | 122 views::View::ConvertPointToView(NULL, frame_->GetRootView(), |
123 &relative_origin); | 123 &relative_origin); |
124 SetBounds(relative_origin.x(), relative_origin.y(), | 124 SetBounds(relative_origin.x(), relative_origin.y(), |
125 window_bounds.width(), window_bounds.height()); | 125 window_bounds.width(), window_bounds.height()); |
126 } | 126 } |
127 | 127 |
128 void BrowserBubble::MovePopup(int x, int y, int w, int h) { | 128 void BrowserBubble::MovePopup(int x, int y, int w, int h) { |
129 popup_->SetBounds(gfx::Rect(x, y, w, h)); | 129 popup_->SetBounds(gfx::Rect(x, y, w, h)); |
130 } | 130 } |
OLD | NEW |