| 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/gtk/browser_actions_toolbar_gtk.h" | 5 #include "chrome/browser/ui/gtk/browser_actions_toolbar_gtk.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 325 // The toolbar containing this button. | 325 // The toolbar containing this button. |
| 326 BrowserActionsToolbarGtk* toolbar_; | 326 BrowserActionsToolbarGtk* toolbar_; |
| 327 | 327 |
| 328 // The extension that contains this browser action. | 328 // The extension that contains this browser action. |
| 329 const Extension* extension_; | 329 const Extension* extension_; |
| 330 | 330 |
| 331 // The button for this browser action. | 331 // The button for this browser action. |
| 332 scoped_ptr<CustomDrawButton> button_; | 332 scoped_ptr<CustomDrawButton> button_; |
| 333 | 333 |
| 334 // The top level widget (parent of |button_|). | 334 // The top level widget (parent of |button_|). |
| 335 OwnedWidgetGtk alignment_; | 335 ui::OwnedWidgetGtk alignment_; |
| 336 | 336 |
| 337 // The one image subwidget in |button_|. We keep this out so we don't alter | 337 // The one image subwidget in |button_|. We keep this out so we don't alter |
| 338 // the widget hierarchy while changing the button image because changing the | 338 // the widget hierarchy while changing the button image because changing the |
| 339 // GTK widget hierarchy invalidates all tooltips and several popular | 339 // GTK widget hierarchy invalidates all tooltips and several popular |
| 340 // extensions change browser action icon in a loop. | 340 // extensions change browser action icon in a loop. |
| 341 GtkWidget* image_; | 341 GtkWidget* image_; |
| 342 | 342 |
| 343 // Loads the button's icons for us on the file thread. | 343 // Loads the button's icons for us on the file thread. |
| 344 ImageLoadingTracker tracker_; | 344 ImageLoadingTracker tracker_; |
| 345 | 345 |
| (...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 951 | 951 |
| 952 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root), | 952 menu->PopupAsContext(gfx::Point(event->x_root, event->y_root), |
| 953 event->time); | 953 event->time); |
| 954 return TRUE; | 954 return TRUE; |
| 955 } | 955 } |
| 956 | 956 |
| 957 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) { | 957 void BrowserActionsToolbarGtk::OnButtonShowOrHide(GtkWidget* sender) { |
| 958 if (!resize_animation_.is_animating()) | 958 if (!resize_animation_.is_animating()) |
| 959 UpdateChevronVisibility(); | 959 UpdateChevronVisibility(); |
| 960 } | 960 } |
| OLD | NEW |