OLD | NEW |
1 // Copyright (c) 2009 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/extensions/browser_action_test_util.h" | 5 #include "chrome/browser/extensions/browser_action_test_util.h" |
6 | 6 |
7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
8 | 8 |
9 #include "chrome/browser/browser_window.h" | 9 #include "chrome/browser/browser_window.h" |
10 #include "chrome/browser/gtk/extension_popup_gtk.h" | |
11 #include "chrome/browser/gtk/extension_view_gtk.h" | |
12 #include "chrome/browser/gtk/view_id_util.h" | |
13 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| 11 #include "chrome/browser/ui/gtk/extension_popup_gtk.h" |
| 12 #include "chrome/browser/ui/gtk/extension_view_gtk.h" |
| 13 #include "chrome/browser/ui/gtk/view_id_util.h" |
14 | 14 |
15 namespace { | 15 namespace { |
16 | 16 |
17 GtkWidget* GetButton(Browser* browser, int index) { | 17 GtkWidget* GetButton(Browser* browser, int index) { |
18 GtkWidget* toolbar = | 18 GtkWidget* toolbar = |
19 ViewIDUtil::GetWidget(GTK_WIDGET(browser->window()->GetNativeHandle()), | 19 ViewIDUtil::GetWidget(GTK_WIDGET(browser->window()->GetNativeHandle()), |
20 VIEW_ID_BROWSER_ACTION_TOOLBAR); | 20 VIEW_ID_BROWSER_ACTION_TOOLBAR); |
21 GtkWidget* button = NULL; | 21 GtkWidget* button = NULL; |
22 if (toolbar) { | 22 if (toolbar) { |
23 GList* children = gtk_container_get_children(GTK_CONTAINER(toolbar)); | 23 GList* children = gtk_container_get_children(GTK_CONTAINER(toolbar)); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 // static | 83 // static |
84 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { | 84 gfx::Size BrowserActionTestUtil::GetMinPopupSize() { |
85 // On Linux we actually just limit the size of the extension view. | 85 // On Linux we actually just limit the size of the extension view. |
86 return gfx::Size(ExtensionPopupGtk::kMinWidth, ExtensionPopupGtk::kMinHeight); | 86 return gfx::Size(ExtensionPopupGtk::kMinWidth, ExtensionPopupGtk::kMinHeight); |
87 } | 87 } |
88 | 88 |
89 // static | 89 // static |
90 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { | 90 gfx::Size BrowserActionTestUtil::GetMaxPopupSize() { |
91 return gfx::Size(ExtensionPopupGtk::kMaxWidth, ExtensionPopupGtk::kMaxHeight); | 91 return gfx::Size(ExtensionPopupGtk::kMaxWidth, ExtensionPopupGtk::kMaxHeight); |
92 } | 92 } |
OLD | NEW |