| 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 "views/controls/native/native_view_host_gtk.h" | 5 #include "views/controls/native/native_view_host_gtk.h" |
| 6 | 6 |
| 7 #include <gtk/gtk.h> | 7 #include <gtk/gtk.h> |
| 8 #include <algorithm> | 8 #include <algorithm> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 249 void NativeViewHostGtk::HideWidget() { | 249 void NativeViewHostGtk::HideWidget() { |
| 250 if (fixed_) | 250 if (fixed_) |
| 251 gtk_widget_hide(fixed_); | 251 gtk_widget_hide(fixed_); |
| 252 } | 252 } |
| 253 | 253 |
| 254 void NativeViewHostGtk::SetFocus() { | 254 void NativeViewHostGtk::SetFocus() { |
| 255 DCHECK(host_->native_view()); | 255 DCHECK(host_->native_view()); |
| 256 gtk_widget_grab_focus(host_->native_view()); | 256 gtk_widget_grab_focus(host_->native_view()); |
| 257 } | 257 } |
| 258 | 258 |
| 259 gfx::NativeViewAccessible NativeViewHostGtk::GetNativeViewAccessible() { |
| 260 return NULL; |
| 261 } |
| 262 |
| 259 //////////////////////////////////////////////////////////////////////////////// | 263 //////////////////////////////////////////////////////////////////////////////// |
| 260 // NativeViewHostGtk, private: | 264 // NativeViewHostGtk, private: |
| 261 | 265 |
| 262 void NativeViewHostGtk::CreateFixed(bool needs_window) { | 266 void NativeViewHostGtk::CreateFixed(bool needs_window) { |
| 263 GtkWidget* focused_widget = GetFocusedDescendant(); | 267 GtkWidget* focused_widget = GetFocusedDescendant(); |
| 264 | 268 |
| 265 bool focus_event_blocked = false; | 269 bool focus_event_blocked = false; |
| 266 // We move focus around and do not want focus events to be emitted | 270 // We move focus around and do not want focus events to be emitted |
| 267 // during this process. | 271 // during this process. |
| 268 if (fixed_) { | 272 if (fixed_) { |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 //////////////////////////////////////////////////////////////////////////////// | 372 //////////////////////////////////////////////////////////////////////////////// |
| 369 // NativeViewHostWrapper, public: | 373 // NativeViewHostWrapper, public: |
| 370 | 374 |
| 371 // static | 375 // static |
| 372 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( | 376 NativeViewHostWrapper* NativeViewHostWrapper::CreateWrapper( |
| 373 NativeViewHost* host) { | 377 NativeViewHost* host) { |
| 374 return new NativeViewHostGtk(host); | 378 return new NativeViewHostGtk(host); |
| 375 } | 379 } |
| 376 | 380 |
| 377 } // namespace views | 381 } // namespace views |
| OLD | NEW |