Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_view_aura.h" | 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| (...skipping 2442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2453 cursor = ui::kCursorPointer; | 2453 cursor = ui::kCursorPointer; |
| 2454 | 2454 |
| 2455 aura::client::CursorClient* cursor_client = | 2455 aura::client::CursorClient* cursor_client = |
| 2456 aura::client::GetCursorClient(root_window); | 2456 aura::client::GetCursorClient(root_window); |
| 2457 if (cursor_client) { | 2457 if (cursor_client) { |
| 2458 cursor_client->SetCursor(cursor); | 2458 cursor_client->SetCursor(cursor); |
| 2459 } | 2459 } |
| 2460 } | 2460 } |
| 2461 | 2461 |
| 2462 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { | 2462 ui::InputMethod* RenderWidgetHostViewAura::GetInputMethod() const { |
| 2463 if (!window_) | |
|
khmel
2016/07/11 19:33:12
Here is a race condition.
When I click on <select
Shu Chen
2016/07/13 05:56:16
Thanks for fixing this!
The InputMethod is necess
| |
| 2464 return NULL; | |
| 2463 aura::Window* root_window = window_->GetRootWindow(); | 2465 aura::Window* root_window = window_->GetRootWindow(); |
| 2464 if (!root_window) | 2466 if (!root_window) |
| 2465 return NULL; | 2467 return NULL; |
| 2466 return root_window->GetHost()->GetInputMethod(); | 2468 return root_window->GetHost()->GetInputMethod(); |
| 2467 } | 2469 } |
| 2468 | 2470 |
| 2469 void RenderWidgetHostViewAura::Shutdown() { | 2471 void RenderWidgetHostViewAura::Shutdown() { |
| 2470 if (!in_shutdown_) { | 2472 if (!in_shutdown_) { |
| 2471 in_shutdown_ = true; | 2473 in_shutdown_ = true; |
| 2472 host_->ShutdownAndDestroyWidget(true); | 2474 host_->ShutdownAndDestroyWidget(true); |
| (...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3001 | 3003 |
| 3002 //////////////////////////////////////////////////////////////////////////////// | 3004 //////////////////////////////////////////////////////////////////////////////// |
| 3003 // RenderWidgetHostViewBase, public: | 3005 // RenderWidgetHostViewBase, public: |
| 3004 | 3006 |
| 3005 // static | 3007 // static |
| 3006 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { | 3008 void RenderWidgetHostViewBase::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 3007 GetScreenInfoForWindow(results, NULL); | 3009 GetScreenInfoForWindow(results, NULL); |
| 3008 } | 3010 } |
| 3009 | 3011 |
| 3010 } // namespace content | 3012 } // namespace content |
| OLD | NEW |