| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "views/controls/native_control_gtk.h" | 5 #include "views/controls/native_control_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "views/focus/focus_manager.h" | 10 #include "views/focus/focus_manager.h" |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 69 G_CALLBACK(CallFocusIn), this); | 69 G_CALLBACK(CallFocusIn), this); |
| 70 } | 70 } |
| 71 | 71 |
| 72 // static | 72 // static |
| 73 void NativeControlGtk::CallFocusIn(GtkWidget* widget, | 73 void NativeControlGtk::CallFocusIn(GtkWidget* widget, |
| 74 GdkEventFocus* event, | 74 GdkEventFocus* event, |
| 75 NativeControlGtk* control) { | 75 NativeControlGtk* control) { |
| 76 FocusManager* focus_manager = | 76 FocusManager* focus_manager = |
| 77 FocusManager::GetFocusManagerForNativeView(widget); | 77 FocusManager::GetFocusManagerForNativeView(widget); |
| 78 if (!focus_manager) { | 78 if (!focus_manager) { |
| 79 NOTREACHED(); | 79 // TODO(jcampan): http://crbug.com/21378 Reenable this NOTREACHED() when the |
| 80 // options page is only based on views. |
| 81 // NOTREACHED(); |
| 80 return; | 82 return; |
| 81 } | 83 } |
| 82 focus_manager->SetFocusedView(control->focus_view()); | 84 focus_manager->SetFocusedView(control->focus_view()); |
| 83 } | 85 } |
| 84 | 86 |
| 85 } // namespace views | 87 } // namespace views |
| OLD | NEW |