diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/controls/native_control_gtk.cc | 4 | ||||
-rw-r--r-- | views/focus/focus_manager_gtk.cc | 6 | ||||
-rw-r--r-- | views/window/dialog_client_view.cc | 23 |
3 files changed, 20 insertions, 13 deletions
diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc index 8de383f..d69ae758 100644 --- a/views/controls/native_control_gtk.cc +++ b/views/controls/native_control_gtk.cc @@ -76,7 +76,9 @@ void NativeControlGtk::CallFocusIn(GtkWidget* widget, FocusManager* focus_manager = FocusManager::GetFocusManagerForNativeView(widget); if (!focus_manager) { - NOTREACHED(); + // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the + // options page is only based on views. + // NOTREACHED(); return; } focus_manager->SetFocusedView(control->focus_view()); diff --git a/views/focus/focus_manager_gtk.cc b/views/focus/focus_manager_gtk.cc index 6ba1390..5372bf4 100644 --- a/views/focus/focus_manager_gtk.cc +++ b/views/focus/focus_manager_gtk.cc @@ -20,7 +20,7 @@ void FocusManager::FocusNativeView(gfx::NativeView native_view) { gtk_widget_grab_focus(native_view); } - // static +// static FocusManager* FocusManager::GetFocusManagerForNativeView( gfx::NativeView native_view) { GtkWidget* root = gtk_widget_get_toplevel(native_view); @@ -29,7 +29,9 @@ FocusManager* FocusManager::GetFocusManagerForNativeView( WidgetGtk* widget = WidgetGtk::GetViewForNative(root); if (!widget) { - NOTREACHED(); + // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the + // options page is only based on views. + // NOTREACHED(); return NULL; } FocusManager* focus_manager = widget->GetFocusManager(); diff --git a/views/window/dialog_client_view.cc b/views/window/dialog_client_view.cc index 98482a0..5261679 100644 --- a/views/window/dialog_client_view.cc +++ b/views/window/dialog_client_view.cc @@ -4,26 +4,30 @@ #include "views/window/dialog_client_view.h" +#if defined(OS_WIN) +#include <windows.h> +#include <uxtheme.h> +#include <vsstyle.h> +#else +#include <gtk/gtk.h> +#endif + +#include <algorithm> + #include "app/gfx/canvas.h" #include "app/gfx/font.h" #include "app/l10n_util.h" #include "app/resource_bundle.h" #include "base/keyboard_codes.h" #include "grit/app_strings.h" +#include "skia/ext/skia_utils_gtk.h" #include "views/controls/button/native_button.h" #include "views/standard_layout.h" #include "views/window/dialog_delegate.h" #include "views/window/window.h" - #if defined(OS_WIN) -#include <windows.h> -#include <uxtheme.h> -#include <vsstyle.h> - #include "base/gfx/native_theme.h" #else -#include <gtk/gtk.h> - #include "views/window/hit_test.h" #include "views/widget/widget.h" #endif @@ -274,9 +278,8 @@ void DialogClientView::Paint(gfx::Canvas* canvas) { GtkWidget* widget = GetWidget()->GetNativeView(); if (GTK_IS_WINDOW(widget)) { GtkStyle* window_style = gtk_widget_get_style(widget); - canvas->FillRectInt(SkColorSetRGB(window_style->bg[GTK_STATE_NORMAL].red, - window_style->bg[GTK_STATE_NORMAL].green, - window_style->bg[GTK_STATE_NORMAL].blue), + canvas->FillRectInt(skia::GdkColorToSkColor( + window_style->bg[GTK_STATE_NORMAL]), 0, 0, width(), height()); } #endif |