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/panels/panel_browser_window_gtk.h" | 5 #include "chrome/browser/ui/panels/panel_browser_window_gtk.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "chrome/browser/ui/browser.h" | 8 #include "chrome/browser/ui/browser.h" |
9 #include "chrome/browser/ui/browser_list.h" | 9 #include "chrome/browser/ui/browser_list.h" |
10 #include "chrome/browser/ui/gtk/browser_titlebar.h" | 10 #include "chrome/browser/ui/gtk/browser_titlebar.h" |
11 #include "chrome/browser/ui/gtk/custom_button.h" | 11 #include "chrome/browser/ui/gtk/custom_button.h" |
12 #include "chrome/browser/ui/gtk/gtk_theme_service.h" | 12 #include "chrome/browser/ui/gtk/gtk_theme_service.h" |
13 #include "chrome/browser/ui/gtk/nine_box.h" | 13 #include "chrome/browser/ui/gtk/nine_box.h" |
14 #include "chrome/browser/ui/panels/panel.h" | 14 #include "chrome/browser/ui/panels/panel.h" |
15 #include "chrome/browser/ui/panels/panel_bounds_animation.h" | 15 #include "chrome/browser/ui/panels/panel_bounds_animation.h" |
16 #include "chrome/browser/ui/panels/panel_browser_titlebar_gtk.h" | 16 #include "chrome/browser/ui/panels/panel_browser_titlebar_gtk.h" |
17 #include "chrome/browser/ui/panels/panel_drag_gtk.h" | 17 #include "chrome/browser/ui/panels/panel_drag_gtk.h" |
18 #include "chrome/browser/ui/panels/panel_manager.h" | 18 #include "chrome/browser/ui/panels/panel_manager.h" |
19 #include "chrome/browser/ui/panels/panel_strip.h" | 19 #include "chrome/browser/ui/panels/panel_strip.h" |
20 #include "chrome/common/chrome_notification_types.h" | 20 #include "chrome/common/chrome_notification_types.h" |
21 #include "content/public/browser/notification_service.h" | 21 #include "content/public/browser/notification_service.h" |
22 #include "grit/theme_resources_standard.h" | 22 #include "grit/theme_resources_standard.h" |
23 #include "grit/ui_resources.h" | 23 #include "grit/ui_resources.h" |
24 #include "third_party/skia/include/core/SkShader.h" | 24 #include "third_party/skia/include/core/SkShader.h" |
25 #include "ui/gfx/canvas.h" | 25 #include "ui/gfx/canvas.h" |
26 #include "ui/gfx/image/cairo_cached_surface.h" | 26 #include "ui/gfx/image/cairo_cached_surface.h" |
27 #include "ui/gfx/image/image.h" | 27 #include "ui/gfx/image/image.h" |
28 #include "ui/gfx/skia_util.h" | 28 #include "ui/gfx/skia_util.h" |
29 | 29 |
| 30 using content::NativeWebKeyboardEvent; |
30 using content::WebContents; | 31 using content::WebContents; |
31 | 32 |
32 namespace { | 33 namespace { |
33 | 34 |
34 // Colors used to draw titlebar and frame for drawing attention under default | 35 // Colors used to draw titlebar and frame for drawing attention under default |
35 // theme. It is also used in non-default theme since attention color is not | 36 // theme. It is also used in non-default theme since attention color is not |
36 // defined in the theme. | 37 // defined in the theme. |
37 const SkColor kAttentionBackgroundColorStart = SkColorSetRGB(0xff, 0xab, 0x57); | 38 const SkColor kAttentionBackgroundColorStart = SkColorSetRGB(0xff, 0xab, 0x57); |
38 const SkColor kAttentionBackgroundColorEnd = SkColorSetRGB(0xe6, 0x9a, 0x4e); | 39 const SkColor kAttentionBackgroundColorEnd = SkColorSetRGB(0xe6, 0x9a, 0x4e); |
39 | 40 |
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 break; | 710 break; |
710 case RESTORE_BUTTON: | 711 case RESTORE_BUTTON: |
711 button = titlebar->unminimize_button(); | 712 button = titlebar->unminimize_button(); |
712 break; | 713 break; |
713 default: | 714 default: |
714 NOTREACHED(); | 715 NOTREACHED(); |
715 return false; | 716 return false; |
716 } | 717 } |
717 return gtk_widget_get_visible(button->widget()); | 718 return gtk_widget_get_visible(button->widget()); |
718 } | 719 } |
OLD | NEW |