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/views/notifications/balloon_view.h" | 5 #include "chrome/browser/ui/views/notifications/balloon_view.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 #include "ui/gfx/insets.h" | 33 #include "ui/gfx/insets.h" |
34 #include "ui/gfx/native_widget_types.h" | 34 #include "ui/gfx/native_widget_types.h" |
35 #include "ui/views/bubble/bubble_border.h" | 35 #include "ui/views/bubble/bubble_border.h" |
36 #include "ui/views/controls/button/button.h" | 36 #include "ui/views/controls/button/button.h" |
37 #include "ui/views/controls/button/image_button.h" | 37 #include "ui/views/controls/button/image_button.h" |
38 #include "ui/views/controls/button/text_button.h" | 38 #include "ui/views/controls/button/text_button.h" |
39 #include "ui/views/controls/menu/menu_item_view.h" | 39 #include "ui/views/controls/menu/menu_item_view.h" |
40 #include "ui/views/controls/menu/menu_model_adapter.h" | 40 #include "ui/views/controls/menu/menu_model_adapter.h" |
41 #include "ui/views/controls/menu/menu_runner.h" | 41 #include "ui/views/controls/menu/menu_runner.h" |
42 #include "ui/views/controls/native/native_view_host.h" | 42 #include "ui/views/controls/native/native_view_host.h" |
| 43 #include "ui/views/painter.h" |
43 #include "ui/views/widget/widget.h" | 44 #include "ui/views/widget/widget.h" |
44 #include "views/painter.h" | |
45 | 45 |
46 using views::Widget; | 46 using views::Widget; |
47 | 47 |
48 namespace { | 48 namespace { |
49 | 49 |
50 const int kTopMargin = 2; | 50 const int kTopMargin = 2; |
51 const int kBottomMargin = 0; | 51 const int kBottomMargin = 0; |
52 const int kLeftMargin = 4; | 52 const int kLeftMargin = 4; |
53 const int kRightMargin = 4; | 53 const int kRightMargin = 4; |
54 const int kShelfBorderTopOverlap = 0; | 54 const int kShelfBorderTopOverlap = 0; |
(...skipping 461 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
516 return; | 516 return; |
517 } | 517 } |
518 | 518 |
519 // If the renderer process attached to this balloon is disconnected | 519 // If the renderer process attached to this balloon is disconnected |
520 // (e.g., because of a crash), we want to close the balloon. | 520 // (e.g., because of a crash), we want to close the balloon. |
521 notification_registrar_.Remove( | 521 notification_registrar_.Remove( |
522 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, | 522 this, chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, |
523 content::Source<Balloon>(balloon_)); | 523 content::Source<Balloon>(balloon_)); |
524 Close(false); | 524 Close(false); |
525 } | 525 } |
OLD | NEW |