| 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 <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/ui/views/bubble/border_contents.h" | 9 #include "chrome/browser/ui/views/bubble/border_contents.h" |
| 10 #include "chrome/browser/ui/views/frame/browser_view.h" | 10 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 11 #include "views/widget/root_view.h" | 11 #include "views/widget/root_view.h" |
| 12 #include "views/widget/native_widget_gtk.h" | 12 #include "views/widget/native_widget_gtk.h" |
| 13 | 13 |
| 14 #if defined(OS_CHROMEOS) | 14 #if defined(OS_CHROMEOS) |
| 15 #include "chrome/browser/chromeos/wm_ipc.h" | 15 #include "chrome/browser/chromeos/wm_ipc.h" |
| 16 #include "third_party/cros/chromeos_wm_ipc_enums.h" | 16 #include "third_party/cros_system_api/window_manager/chromeos_wm_ipc_enums.h" |
| 17 #endif | 17 #endif |
| 18 | 18 |
| 19 using std::vector; | 19 using std::vector; |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 class BubbleWidget : public views::NativeWidgetGtk { | 23 class BubbleWidget : public views::NativeWidgetGtk { |
| 24 public: | 24 public: |
| 25 BubbleWidget(BrowserBubble* bubble, const gfx::Insets& content_margins) | 25 BubbleWidget(BrowserBubble* bubble, const gfx::Insets& content_margins) |
| 26 : views::NativeWidgetGtk(new views::Widget), | 26 : views::NativeWidgetGtk(new views::Widget), |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 150 gfx::Rect contents_bounds; | 150 gfx::Rect contents_bounds; |
| 151 border_contents->SizeAndGetBounds(GetAbsoluteRelativeTo(), | 151 border_contents->SizeAndGetBounds(GetAbsoluteRelativeTo(), |
| 152 arrow_location_, false, view_->size(), | 152 arrow_location_, false, view_->size(), |
| 153 &contents_bounds, &window_bounds); | 153 &contents_bounds, &window_bounds); |
| 154 | 154 |
| 155 border_contents->SetBoundsRect(gfx::Rect(gfx::Point(), window_bounds.size())); | 155 border_contents->SetBoundsRect(gfx::Rect(gfx::Point(), window_bounds.size())); |
| 156 view_->SetBoundsRect(contents_bounds); | 156 view_->SetBoundsRect(contents_bounds); |
| 157 | 157 |
| 158 SetAbsoluteBounds(window_bounds); | 158 SetAbsoluteBounds(window_bounds); |
| 159 } | 159 } |
| OLD | NEW |