| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 87         type == ui::ET_TRANSLATED_KEY_RELEASE) { | 87         type == ui::ET_TRANSLATED_KEY_RELEASE) { | 
| 88       // The |event| is already handled by this object, change the type of the | 88       // The |event| is already handled by this object, change the type of the | 
| 89       // event to ui::ET_KEY_* and pass it to the next filter. | 89       // event to ui::ET_KEY_* and pass it to the next filter. | 
| 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::InputMethodDelegate: | 97   // ui::internal::InputMethodDelegate: | 
| 98   virtual bool DispatchKeyEventPostIME( | 98   virtual bool DispatchKeyEventPostIME(const ui::KeyEvent& event) OVERRIDE { | 
| 99       const base::NativeEvent& event) OVERRIDE { | 99     ui::TranslatedKeyEvent aura_event(event); | 
| 100     ui::TranslatedKeyEvent aura_event(event, false /* is_char */); | 100     return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent(&aura_event); | 
| 101     return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent( |  | 
| 102         &aura_event); |  | 
| 103   } |  | 
| 104 |  | 
| 105   virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, |  | 
| 106                                                  ui::KeyboardCode key_code, |  | 
| 107                                                  int flags) OVERRIDE { |  | 
| 108     ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code, |  | 
| 109                                       flags); |  | 
| 110     return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent( |  | 
| 111         &aura_event); |  | 
| 112   } | 101   } | 
| 113 | 102 | 
| 114   aura::RootWindow* root_; | 103   aura::RootWindow* root_; | 
| 115   scoped_ptr<ui::InputMethod> input_method_; | 104   scoped_ptr<ui::InputMethod> input_method_; | 
| 116 | 105 | 
| 117   DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); | 106   DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); | 
| 118 }; | 107 }; | 
| 119 | 108 | 
| 120 } | 109 } | 
| 121 | 110 | 
| (...skipping 25 matching lines...) Expand all  Loading... | 
| 147   root_window_->host()->Show(); | 136   root_window_->host()->Show(); | 
| 148 } | 137 } | 
| 149 | 138 | 
| 150 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { | 139 void ShellPlatformDataAura::ResizeWindow(const gfx::Size& size) { | 
| 151   root_window_->host()->SetBounds(gfx::Rect(size)); | 140   root_window_->host()->SetBounds(gfx::Rect(size)); | 
| 152 } | 141 } | 
| 153 | 142 | 
| 154 | 143 | 
| 155 | 144 | 
| 156 }  // namespace content | 145 }  // namespace content | 
| OLD | NEW | 
|---|