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