OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "ui/keyboard/keyboard_controller_proxy.h" | 5 #include "ui/keyboard/keyboard_controller_proxy.h" |
6 | 6 |
7 #include "base/values.h" | 7 #include "base/values.h" |
8 #include "content/public/browser/site_instance.h" | 8 #include "content/public/browser/site_instance.h" |
9 #include "content/public/browser/web_contents.h" | 9 #include "content/public/browser/web_contents.h" |
10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 content::WebContents::CreateParams(context, | 153 content::WebContents::CreateParams(context, |
154 content::SiteInstance::CreateForURL(context, GetValidUrl())))); | 154 content::SiteInstance::CreateForURL(context, GetValidUrl())))); |
155 keyboard_contents_->SetDelegate(new KeyboardContentsDelegate(this)); | 155 keyboard_contents_->SetDelegate(new KeyboardContentsDelegate(this)); |
156 SetupWebContents(keyboard_contents_.get()); | 156 SetupWebContents(keyboard_contents_.get()); |
157 ReloadContents(); | 157 ReloadContents(); |
158 } | 158 } |
159 | 159 |
160 return keyboard_contents_->GetView()->GetNativeView(); | 160 return keyboard_contents_->GetView()->GetNativeView(); |
161 } | 161 } |
162 | 162 |
| 163 bool KeyboardControllerProxy::HasKeyboardWindow() const { |
| 164 return keyboard_contents_; |
| 165 } |
| 166 |
163 void KeyboardControllerProxy::ShowKeyboardContainer(aura::Window* container) { | 167 void KeyboardControllerProxy::ShowKeyboardContainer(aura::Window* container) { |
164 GetKeyboardWindow()->Show(); | 168 GetKeyboardWindow()->Show(); |
165 container->Show(); | 169 container->Show(); |
166 } | 170 } |
167 | 171 |
168 void KeyboardControllerProxy::HideKeyboardContainer(aura::Window* container) { | 172 void KeyboardControllerProxy::HideKeyboardContainer(aura::Window* container) { |
169 container->Hide(); | 173 container->Hide(); |
170 GetKeyboardWindow()->Hide(); | 174 GetKeyboardWindow()->Hide(); |
171 } | 175 } |
172 | 176 |
(...skipping 11 matching lines...) Expand all Loading... |
184 } | 188 } |
185 } | 189 } |
186 | 190 |
187 void KeyboardControllerProxy::EnsureCaretInWorkArea() { | 191 void KeyboardControllerProxy::EnsureCaretInWorkArea() { |
188 } | 192 } |
189 | 193 |
190 void KeyboardControllerProxy::SetupWebContents(content::WebContents* contents) { | 194 void KeyboardControllerProxy::SetupWebContents(content::WebContents* contents) { |
191 } | 195 } |
192 | 196 |
193 } // namespace keyboard | 197 } // namespace keyboard |
OLD | NEW |