diff options
-rw-r--r-- | chrome/browser/chromeos/settings_page_view.cc | 5 | ||||
-rw-r--r-- | views/controls/native/native_view_host_gtk.cc | 12 | ||||
-rw-r--r-- | views/controls/native_control_gtk.cc | 1 | ||||
-rw-r--r-- | views/focus/focus_manager_gtk.cc | 1 |
4 files changed, 15 insertions, 4 deletions
diff --git a/chrome/browser/chromeos/settings_page_view.cc b/chrome/browser/chromeos/settings_page_view.cc index 9c19c34..0702928 100644 --- a/chrome/browser/chromeos/settings_page_view.cc +++ b/chrome/browser/chromeos/settings_page_view.cc @@ -5,6 +5,7 @@ #include "chrome/browser/chromeos/settings_page_view.h" #include "chrome/browser/chromeos/settings_contents_view.h" +#include "skia/ext/skia_utils_gtk.h" #include "views/controls/label.h" #include "views/fill_layout.h" #include "views/widget/widget_gtk.h" @@ -19,6 +20,10 @@ GtkWidget* SettingsPageView::WrapInGtkWidget() { new views::WidgetGtk(views::WidgetGtk::TYPE_CHILD); widget->Init(NULL, gfx::Rect()); widget->SetContentsView(this); + // Set to a solid background with the same color as the widget's bg color. + GtkStyle* window_style = gtk_widget_get_style(widget->GetNativeView()); + set_background(views::Background::CreateSolidBackground( + skia::GdkColorToSkColor(window_style->bg[GTK_STATE_NORMAL]))); widget->Show(); // Removing the widget from the container results in unref'ing the widget. We // need to ref here otherwise the removal deletes the widget. The caller ends diff --git a/views/controls/native/native_view_host_gtk.cc b/views/controls/native/native_view_host_gtk.cc index 306aa94..ea9bd62 100644 --- a/views/controls/native/native_view_host_gtk.cc +++ b/views/controls/native/native_view_host_gtk.cc @@ -5,6 +5,7 @@ #include "views/controls/native/native_view_host_gtk.h" #include <gtk/gtk.h> +#include <algorithm> #include "base/logging.h" #include "views/controls/native/native_view_host.h" @@ -48,8 +49,8 @@ void NativeViewHostGtk::NativeViewAttached() { if (!focus_signal_id_) { focus_signal_id_ = g_signal_connect(G_OBJECT(host_->native_view()), - "focus-in-event", - G_CALLBACK(CallFocusIn), this); + "focus-in-event", + G_CALLBACK(CallFocusIn), this); } // Always layout though. @@ -215,12 +216,15 @@ void NativeViewHostGtk::CallDestroy(GtkObject* object, // static void NativeViewHostGtk::CallFocusIn(GtkWidget* widget, - GdkEventFocus* event, + GdkEventFocus* event, NativeViewHostGtk* host) { 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(); + NOTIMPLEMENTED(); return; } focus_manager->SetFocusedView(host->host_->focus_view()); diff --git a/views/controls/native_control_gtk.cc b/views/controls/native_control_gtk.cc index d69ae758..082e610 100644 --- a/views/controls/native_control_gtk.cc +++ b/views/controls/native_control_gtk.cc @@ -79,6 +79,7 @@ void NativeControlGtk::CallFocusIn(GtkWidget* widget, // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the // options page is only based on views. // NOTREACHED(); + NOTIMPLEMENTED(); return; } focus_manager->SetFocusedView(control->focus_view()); diff --git a/views/focus/focus_manager_gtk.cc b/views/focus/focus_manager_gtk.cc index 5372bf4..93b9cb7 100644 --- a/views/focus/focus_manager_gtk.cc +++ b/views/focus/focus_manager_gtk.cc @@ -32,6 +32,7 @@ FocusManager* FocusManager::GetFocusManagerForNativeView( // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the // options page is only based on views. // NOTREACHED(); + NOTIMPLEMENTED(); return NULL; } FocusManager* focus_manager = widget->GetFocusManager(); |