| 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/frame/bubble_window_views.h" | 5 #include "chrome/browser/chromeos/frame/bubble_window_views.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" | 9 #include "chrome/browser/chromeos/frame/bubble_frame_view.h" |
| 10 #include "ui/gfx/skia_utils_gtk.h" | 10 #include "ui/gfx/skia_utils_gtk.h" |
| 11 #include "views/widget/widget_delegate.h" | 11 #include "views/widget/widget_delegate.h" |
| 12 #include "views/window/non_client_view.h" | 12 #include "views/window/non_client_view.h" |
| 13 | 13 |
| 14 | 14 |
| 15 namespace chromeos { | 15 namespace chromeos { |
| 16 | 16 |
| 17 BubbleWindowViews::BubbleWindowViews(BubbleWindowStyle style) | 17 BubbleWindowViews::BubbleWindowViews(BubbleWindowStyle style) |
| 18 : style_(style) { | 18 : style_(style) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 void BubbleWindowViews::SetBackgroundColor() { | 21 void BubbleWindowViews::SetBackgroundColor() { |
| 22 #if !defined(USE_AURA) | 22 #if !defined(USE_AURA) |
| 23 // TODO(saintlou): Once Views are truly pure the code below needs to be | 23 // TODO(saintlou): Once Views are truly pure the code below needs to be |
| 24 // removed and replaced by the corresponding Views code. | 24 // removed and replaced by the corresponding Views code. |
| 25 GdkColor background_color = | 25 GdkColor background_color = |
| 26 gfx::SkColorToGdkColor(kBubbleWindowBackgroundColor); | 26 gfx::SkColorToGdkColor(kBubbleWindowBackgroundColor); |
| 27 gtk_widget_modify_bg(GetNativeView(), GTK_STATE_NORMAL, &background_color); | 27 gtk_widget_modify_bg(GetNativeView(), GTK_STATE_NORMAL, &background_color); |
| 28 #endif | 28 #endif |
| 29 } | 29 } |
| 30 | 30 |
| 31 views::NonClientFrameView* BubbleWindowViews::CreateNonClientFrameView() { | 31 views::NonClientFrameView* BubbleWindowViews::CreateNonClientFrameView() { |
| 32 return new BubbleFrameView(this, widget_delegate(), style_); | 32 return new BubbleFrameView(this, widget_delegate(), style_); |
| 33 } | 33 } |
| 34 | 34 |
| 35 } // namespace chromeos | 35 } // namespace chromeos |
| OLD | NEW |