| 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/bubble/bubble_gtk.h" | 5 #include "chrome/browser/ui/gtk/bubble/bubble_gtk.h" |
| 6 | 6 |
| 7 #include <gdk/gdkkeysyms.h> | 7 #include <gdk/gdkkeysyms.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h" | 10 #include "chrome/browser/ui/gtk/bubble/bubble_accelerators_gtk.h" |
| 11 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 11 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
| 12 #include "chrome/browser/ui/gtk/gtk_util.h" | 12 #include "chrome/browser/ui/gtk/gtk_util.h" |
| 13 #include "chrome/common/chrome_notification_types.h" | 13 #include "chrome/common/chrome_notification_types.h" |
| 14 #include "content/common/notification_service.h" | 14 #include "content/public/browser/notification_source.h" |
| 15 #include "ui/base/gtk/gtk_hig_constants.h" | 15 #include "ui/base/gtk/gtk_hig_constants.h" |
| 16 #include "ui/base/gtk/gtk_windowing.h" | 16 #include "ui/base/gtk/gtk_windowing.h" |
| 17 #include "ui/gfx/gtk_util.h" | 17 #include "ui/gfx/gtk_util.h" |
| 18 #include "ui/gfx/path.h" | 18 #include "ui/gfx/path.h" |
| 19 #include "ui/gfx/rect.h" | 19 #include "ui/gfx/rect.h" |
| 20 | 20 |
| 21 namespace { | 21 namespace { |
| 22 | 22 |
| 23 // The height of the arrow, and the width will be about twice the height. | 23 // The height of the arrow, and the width will be about twice the height. |
| 24 const int kArrowSize = 8; | 24 const int kArrowSize = 8; |
| (...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 525 gboolean BubbleGtk::OnToplevelUnmap(GtkWidget* widget, GdkEvent* event) { | 525 gboolean BubbleGtk::OnToplevelUnmap(GtkWidget* widget, GdkEvent* event) { |
| 526 Close(); | 526 Close(); |
| 527 return FALSE; | 527 return FALSE; |
| 528 } | 528 } |
| 529 | 529 |
| 530 void BubbleGtk::OnAnchorAllocate(GtkWidget* widget, | 530 void BubbleGtk::OnAnchorAllocate(GtkWidget* widget, |
| 531 GtkAllocation* allocation) { | 531 GtkAllocation* allocation) { |
| 532 if (!UpdateArrowLocation(false)) | 532 if (!UpdateArrowLocation(false)) |
| 533 MoveWindow(); | 533 MoveWindow(); |
| 534 } | 534 } |
| OLD | NEW |