| 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "content/public/browser/site_instance.h" | 9 #include "content/public/browser/site_instance.h" |
| 10 #include "content/public/browser/web_contents.h" | 10 #include "content/public/browser/web_contents.h" |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return default_url_; | 99 return default_url_; |
| 100 } | 100 } |
| 101 } | 101 } |
| 102 | 102 |
| 103 void KeyboardControllerProxy::LoadContents(const GURL& url) { | 103 void KeyboardControllerProxy::LoadContents(const GURL& url) { |
| 104 if (keyboard_contents_) { | 104 if (keyboard_contents_) { |
| 105 content::OpenURLParams params( | 105 content::OpenURLParams params( |
| 106 url, | 106 url, |
| 107 content::Referrer(), | 107 content::Referrer(), |
| 108 SINGLETON_TAB, | 108 SINGLETON_TAB, |
| 109 content::PAGE_TRANSITION_AUTO_TOPLEVEL, | 109 ui::PAGE_TRANSITION_AUTO_TOPLEVEL, |
| 110 false); | 110 false); |
| 111 keyboard_contents_->OpenURL(params); | 111 keyboard_contents_->OpenURL(params); |
| 112 } | 112 } |
| 113 } | 113 } |
| 114 | 114 |
| 115 aura::Window* KeyboardControllerProxy::GetKeyboardWindow() { | 115 aura::Window* KeyboardControllerProxy::GetKeyboardWindow() { |
| 116 if (!keyboard_contents_) { | 116 if (!keyboard_contents_) { |
| 117 content::BrowserContext* context = GetBrowserContext(); | 117 content::BrowserContext* context = GetBrowserContext(); |
| 118 keyboard_contents_.reset(content::WebContents::Create( | 118 keyboard_contents_.reset(content::WebContents::Create( |
| 119 content::WebContents::CreateParams(context, | 119 content::WebContents::CreateParams(context, |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 } | 199 } |
| 200 | 200 |
| 201 shadow_->SetContentBounds(new_bounds); | 201 shadow_->SetContentBounds(new_bounds); |
| 202 } | 202 } |
| 203 | 203 |
| 204 void KeyboardControllerProxy::OnWindowDestroyed(aura::Window* window) { | 204 void KeyboardControllerProxy::OnWindowDestroyed(aura::Window* window) { |
| 205 window->RemoveObserver(this); | 205 window->RemoveObserver(this); |
| 206 } | 206 } |
| 207 | 207 |
| 208 } // namespace keyboard | 208 } // namespace keyboard |
| OLD | NEW |