OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.h" | 5 #include "content/shell/browser/shell.h" |
6 | 6 |
7 #include "content/public/browser/web_contents.h" | 7 #include "content/public/browser/web_contents.h" |
8 #include "content/public/browser/web_contents_view.h" | 8 #include "content/public/browser/web_contents_view.h" |
9 #include "content/shell/browser/shell_aura.h" | 9 #include "content/shell/browser/shell_aura.h" |
10 #include "ui/aura/client/aura_constants.h" | 10 #include "ui/aura/client/aura_constants.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } else { | 94 } else { |
95 if (input_method_->DispatchKeyEvent(*event)) | 95 if (input_method_->DispatchKeyEvent(*event)) |
96 event->StopPropagation(); | 96 event->StopPropagation(); |
97 } | 97 } |
98 } | 98 } |
99 | 99 |
100 // ui::InputMethodDelegate: | 100 // ui::InputMethodDelegate: |
101 virtual bool DispatchKeyEventPostIME( | 101 virtual bool DispatchKeyEventPostIME( |
102 const base::NativeEvent& event) OVERRIDE { | 102 const base::NativeEvent& event) OVERRIDE { |
103 ui::TranslatedKeyEvent aura_event(event, false /* is_char */); | 103 ui::TranslatedKeyEvent aura_event(event, false /* is_char */); |
104 return root_->AsRootWindowHostDelegate()->OnHostKeyEvent( | 104 return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent( |
105 &aura_event); | 105 &aura_event); |
106 } | 106 } |
107 | 107 |
108 virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, | 108 virtual bool DispatchFabricatedKeyEventPostIME(ui::EventType type, |
109 ui::KeyboardCode key_code, | 109 ui::KeyboardCode key_code, |
110 int flags) OVERRIDE { | 110 int flags) OVERRIDE { |
111 ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code, | 111 ui::TranslatedKeyEvent aura_event(type == ui::ET_KEY_PRESSED, key_code, |
112 flags); | 112 flags); |
113 return root_->AsRootWindowHostDelegate()->OnHostKeyEvent( | 113 return root_->AsWindowTreeHostDelegate()->OnHostKeyEvent( |
114 &aura_event); | 114 &aura_event); |
115 } | 115 } |
116 | 116 |
117 aura::RootWindow* root_; | 117 aura::RootWindow* root_; |
118 scoped_ptr<ui::InputMethod> input_method_; | 118 scoped_ptr<ui::InputMethod> input_method_; |
119 | 119 |
120 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); | 120 DISALLOW_COPY_AND_ASSIGN(MinimalInputEventFilter); |
121 }; | 121 }; |
122 | 122 |
123 } | 123 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 } | 195 } |
196 | 196 |
197 void Shell::Close() { | 197 void Shell::Close() { |
198 web_contents_.reset(); | 198 web_contents_.reset(); |
199 } | 199 } |
200 | 200 |
201 void Shell::PlatformSetTitle(const base::string16& title) { | 201 void Shell::PlatformSetTitle(const base::string16& title) { |
202 } | 202 } |
203 | 203 |
204 } // namespace content | 204 } // namespace content |
OLD | NEW |