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/chromeos/notifications/balloon_view.h" | 5 #include "chrome/browser/chromeos/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 12 matching lines...) Expand all Loading... |
23 #include "content/browser/renderer_host/render_widget_host_view.h" | 23 #include "content/browser/renderer_host/render_widget_host_view.h" |
24 #include "content/browser/tab_contents/tab_contents.h" | 24 #include "content/browser/tab_contents/tab_contents.h" |
25 #include "content/public/browser/notification_details.h" | 25 #include "content/public/browser/notification_details.h" |
26 #include "content/public/browser/notification_source.h" | 26 #include "content/public/browser/notification_source.h" |
27 #include "grit/generated_resources.h" | 27 #include "grit/generated_resources.h" |
28 #include "grit/theme_resources.h" | 28 #include "grit/theme_resources.h" |
29 #include "grit/theme_resources_standard.h" | 29 #include "grit/theme_resources_standard.h" |
30 #include "ui/base/l10n/l10n_util.h" | 30 #include "ui/base/l10n/l10n_util.h" |
31 #include "ui/base/models/simple_menu_model.h" | 31 #include "ui/base/models/simple_menu_model.h" |
32 #include "ui/base/resource/resource_bundle.h" | 32 #include "ui/base/resource/resource_bundle.h" |
| 33 #include "ui/views/background.h" |
33 #include "ui/views/controls/button/button.h" | 34 #include "ui/views/controls/button/button.h" |
34 #include "ui/views/controls/button/image_button.h" | 35 #include "ui/views/controls/button/image_button.h" |
35 #include "ui/views/controls/button/menu_button.h" | 36 #include "ui/views/controls/button/menu_button.h" |
36 #include "ui/views/controls/label.h" | 37 #include "ui/views/controls/label.h" |
37 #include "ui/views/controls/menu/menu_item_view.h" | 38 #include "ui/views/controls/menu/menu_item_view.h" |
38 #include "ui/views/controls/menu/menu_model_adapter.h" | 39 #include "ui/views/controls/menu/menu_model_adapter.h" |
39 #include "ui/views/controls/menu/menu_runner.h" | 40 #include "ui/views/controls/menu/menu_runner.h" |
40 #include "ui/views/controls/menu/view_menu_delegate.h" | 41 #include "ui/views/controls/menu/view_menu_delegate.h" |
41 #include "ui/views/widget/widget.h" | 42 #include "ui/views/widget/widget.h" |
42 #include "views/background.h" | |
43 | 43 |
44 namespace { | 44 namespace { |
45 // Menu commands | 45 // Menu commands |
46 const int kNoopCommand = 0; | 46 const int kNoopCommand = 0; |
47 const int kRevokePermissionCommand = 1; | 47 const int kRevokePermissionCommand = 1; |
48 | 48 |
49 // Vertical margin between close button and menu button. | 49 // Vertical margin between close button and menu button. |
50 const int kControlButtonsMargin = 6; | 50 const int kControlButtonsMargin = 6; |
51 | 51 |
52 // Top, Right margin for notification control view. | 52 // Top, Right margin for notification control view. |
(...skipping 310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
363 } | 363 } |
364 | 364 |
365 gfx::NativeView BalloonViewImpl::GetParentNativeView() { | 365 gfx::NativeView BalloonViewImpl::GetParentNativeView() { |
366 RenderWidgetHostView* view = | 366 RenderWidgetHostView* view = |
367 html_contents_->tab_contents()->render_view_host()->view(); | 367 html_contents_->tab_contents()->render_view_host()->view(); |
368 DCHECK(view); | 368 DCHECK(view); |
369 return view->GetNativeView(); | 369 return view->GetNativeView(); |
370 } | 370 } |
371 | 371 |
372 } // namespace chromeos | 372 } // namespace chromeos |
OLD | NEW |