| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/shell/browser/shell_platform_data_aura.h" | 5 #include "content/shell/browser/shell_platform_data_aura.h" |
| 6 | 6 |
| 7 #include "content/shell/browser/shell.h" | 7 #include "content/shell/browser/shell.h" |
| 8 #include "ui/aura/client/aura_constants.h" | 8 #include "ui/aura/client/aura_constants.h" |
| 9 #include "ui/aura/client/default_activation_client.h" | 9 #include "ui/aura/client/default_activation_client.h" |
| 10 #include "ui/aura/client/default_capture_client.h" | 10 #include "ui/aura/client/default_capture_client.h" |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent(); | 90 static_cast<ui::TranslatedKeyEvent*>(event)->ConvertToKeyEvent(); |
| 91 } else { | 91 } else { |
| 92 if (input_method_->DispatchKeyEvent(*event)) | 92 if (input_method_->DispatchKeyEvent(*event)) |
| 93 event->StopPropagation(); | 93 event->StopPropagation(); |
| 94 } | 94 } |
| 95 } | 95 } |
| 96 | 96 |
| 97 // ui::internal::InputMethodDelegate: | 97 // ui::internal::InputMethodDelegate: |
| 98 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { | 98 virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { |
| 99 ui::TranslatedKeyEvent aura_event(event); | 99 ui::TranslatedKeyEvent aura_event(event); |
| 100 return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(&aura_event); | 100 ui::EventDispatchDetails details = root_->OnEventFromSource(&aura_event); |
| 101 return aura_event.handled() || details.dispatcher_destroyed; |
| 101 } | 102 } |
| 102 | 103 |
| 103 aura::RootWindow* root_; | 104 aura::RootWindow* root_; |
| 104 scoped_ptr<ui::InputMethod> input_method_; | 105 scoped_ptr<ui::InputMethod> input_method_; |
| 105 | 106 |
| 106 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); | 107 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); |
| 107 }; | 108 }; |
| 108 | 109 |
| 109 } | 110 } |
| 110 | 111 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 136 root_window_->host()->Show(); | 137 root_window_->host()->Show(); |
| 137 } | 138 } |
| 138 | 139 |
| 139 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { | 140 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { |
| 140 root_window_->host()->SetBounds(gfx::Rect(size)); | 141 root_window_->host()->SetBounds(gfx::Rect(size)); |
| 141 } | 142 } |
| 142 | 143 |
| 143 | 144 |
| 144 | 145 |
| 145 } // namespace content | 146 } // namespace content |
| OLD | NEW |