| 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 "chrome/browser/ui/gtk/status_bubble_gtk.h" | 5 #include "chrome/browser/ui/gtk/status_bubble_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 36 | 36 |
| 37 // How close the mouse can get to the infobubble before it starts sliding | 37 // How close the mouse can get to the infobubble before it starts sliding |
| 38 // off-screen. | 38 // off-screen. |
| 39 const int kMousePadding = 20; | 39 const int kMousePadding = 20; |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 StatusBubbleGtk::StatusBubbleGtk(Profile* profile) | 43 StatusBubbleGtk::StatusBubbleGtk(Profile* profile) |
| 44 : theme_service_(GtkThemeService::GetFrom(profile)), | 44 : theme_service_(GtkThemeService::GetFrom(profile)), |
| 45 padding_(NULL), | 45 padding_(NULL), |
| 46 start_width_(0), |
| 47 desired_width_(0), |
| 46 flip_horizontally_(false), | 48 flip_horizontally_(false), |
| 47 y_offset_(0), | 49 y_offset_(0), |
| 48 download_shelf_is_visible_(false), | 50 download_shelf_is_visible_(false), |
| 49 last_mouse_location_(0, 0), | |
| 50 last_mouse_left_content_(false), | 51 last_mouse_left_content_(false), |
| 51 ignore_next_left_content_(false) { | 52 ignore_next_left_content_(false) { |
| 52 InitWidgets(); | 53 InitWidgets(); |
| 53 | 54 |
| 54 theme_service_->InitThemesFor(this); | 55 theme_service_->InitThemesFor(this); |
| 55 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, | 56 registrar_.Add(this, chrome::NOTIFICATION_BROWSER_THEME_CHANGED, |
| 56 content::Source<ThemeService>(theme_service_)); | 57 content::Source<ThemeService>(theme_service_)); |
| 57 } | 58 } |
| 58 | 59 |
| 59 StatusBubbleGtk::~StatusBubbleGtk() { | 60 StatusBubbleGtk::~StatusBubbleGtk() { |
| (...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 return FALSE; | 371 return FALSE; |
| 371 } | 372 } |
| 372 | 373 |
| 373 void StatusBubbleGtk::AnimationEnded(const ui::Animation* animation) { | 374 void StatusBubbleGtk::AnimationEnded(const ui::Animation* animation) { |
| 374 UpdateLabelSizeRequest(); | 375 UpdateLabelSizeRequest(); |
| 375 } | 376 } |
| 376 | 377 |
| 377 void StatusBubbleGtk::AnimationProgressed(const ui::Animation* animation) { | 378 void StatusBubbleGtk::AnimationProgressed(const ui::Animation* animation) { |
| 378 UpdateLabelSizeRequest(); | 379 UpdateLabelSizeRequest(); |
| 379 } | 380 } |
| OLD | NEW |