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/views/frame/browser_view.h" | 7 #include "chrome/browser/ui/views/frame/browser_view.h" |
8 #if defined(OS_WIN) | |
9 #include "chrome/browser/external_tab_container_win.h" | |
10 #endif | |
11 #include "views/widget/widget.h" | 8 #include "views/widget/widget.h" |
12 | 9 |
13 namespace { | 10 namespace { |
14 | 11 |
15 BrowserBubbleHost* GetBubbleHostFromFrame(views::Widget* frame) { | 12 BrowserBubbleHost* GetBubbleHostFromFrame(views::Widget* frame) { |
16 if (!frame) | 13 if (!frame) |
17 return NULL; | 14 return NULL; |
18 | 15 |
19 BrowserBubbleHost* bubble_host = NULL; | 16 BrowserBubbleHost* bubble_host = NULL; |
20 views::Widget* window = frame->GetTopLevelWidget(); | 17 views::Widget* window = frame->GetTopLevelWidget(); |
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 gfx::Point relative_origin = window_bounds.origin(); | 136 gfx::Point relative_origin = window_bounds.origin(); |
140 views::View::ConvertPointToView(NULL, frame_->GetRootView(), | 137 views::View::ConvertPointToView(NULL, frame_->GetRootView(), |
141 &relative_origin); | 138 &relative_origin); |
142 SetBounds(relative_origin.x(), relative_origin.y(), | 139 SetBounds(relative_origin.x(), relative_origin.y(), |
143 window_bounds.width(), window_bounds.height()); | 140 window_bounds.width(), window_bounds.height()); |
144 } | 141 } |
145 | 142 |
146 void BrowserBubble::MovePopup(int x, int y, int w, int h) { | 143 void BrowserBubble::MovePopup(int x, int y, int w, int h) { |
147 popup_->SetBounds(gfx::Rect(x, y, w, h)); | 144 popup_->SetBounds(gfx::Rect(x, y, w, h)); |
148 } | 145 } |
OLD | NEW |