| 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 <gtk/gtk.h> | 5 #include <gtk/gtk.h> |
| 6 | 6 |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
| 9 #include "chrome/browser/ui/browser_window.h" | 9 #include "chrome/browser/ui/browser_window.h" |
| 10 #include "chrome/browser/ui/gtk/browser_window_gtk.h" | 10 #include "chrome/browser/ui/gtk/browser_window_gtk.h" |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 virtual void BubbleClosing(BubbleGtk* bubble, | 27 virtual void BubbleClosing(BubbleGtk* bubble, |
| 28 bool closed_by_escape) OVERRIDE { | 28 bool closed_by_escape) OVERRIDE { |
| 29 } | 29 } |
| 30 | 30 |
| 31 Profile* GetProfile() { | 31 Profile* GetProfile() { |
| 32 return browser()->profile(); | 32 return browser()->profile(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 GtkWidget* GetNativeBrowserWindow() { | 35 GtkWidget* GetNativeBrowserWindow() { |
| 36 if (!browser_window_) | 36 if (!browser_window_) |
| 37 browser_window_ = GTK_WIDGET(browser()->window()->GetNativeHandle()); | 37 browser_window_ = GTK_WIDGET(browser()->window()->GetNativeWindow()); |
| 38 return browser_window_; | 38 return browser_window_; |
| 39 } | 39 } |
| 40 | 40 |
| 41 private: | 41 private: |
| 42 GtkWidget* browser_window_; | 42 GtkWidget* browser_window_; |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 // Tests that we can adjust a bubble arrow so we can show a bubble without being | 45 // Tests that we can adjust a bubble arrow so we can show a bubble without being |
| 46 // clipped. This test verifies the following four issues: | 46 // clipped. This test verifies the following four issues: |
| 47 // 1. Shows a bubble to the top-left corner and see its arrow location always | 47 // 1. Shows a bubble to the top-left corner and see its arrow location always |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 BubbleGtk::MATCH_SYSTEM_THEME | | 128 BubbleGtk::MATCH_SYSTEM_THEME | |
| 129 BubbleGtk::POPUP_WINDOW | | 129 BubbleGtk::POPUP_WINDOW | |
| 130 BubbleGtk::GRAB_INPUT, | 130 BubbleGtk::GRAB_INPUT, |
| 131 theme_service, | 131 theme_service, |
| 132 this); | 132 this); |
| 133 EXPECT_EQ(points[i].expected, bubble->current_arrow_location_); | 133 EXPECT_EQ(points[i].expected, bubble->current_arrow_location_); |
| 134 bubble->Close(); | 134 bubble->Close(); |
| 135 } | 135 } |
| 136 } | 136 } |
| 137 } | 137 } |
| OLD | NEW |