OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/cros_language_options_handler
.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/bind_helpers.h" | 8 #include "base/bind_helpers.h" |
9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 ->GetActiveIMEState() | 233 ->GetActiveIMEState() |
234 ->GetInputMethodFromId(input_method_id); | 234 ->GetInputMethodFromId(input_method_id); |
235 if (!ime) | 235 if (!ime) |
236 return; | 236 return; |
237 | 237 |
238 Browser* browser = chrome::FindBrowserWithWebContents( | 238 Browser* browser = chrome::FindBrowserWithWebContents( |
239 web_ui()->GetWebContents()); | 239 web_ui()->GetWebContents()); |
240 content::OpenURLParams params(ime->options_page_url(), | 240 content::OpenURLParams params(ime->options_page_url(), |
241 content::Referrer(), | 241 content::Referrer(), |
242 SINGLETON_TAB, | 242 SINGLETON_TAB, |
243 content::PAGE_TRANSITION_LINK, | 243 ui::PAGE_TRANSITION_LINK, |
244 false); | 244 false); |
245 browser->OpenURL(params); | 245 browser->OpenURL(params); |
246 browser->window()->Show(); | 246 browser->window()->Show(); |
247 content::WebContents* web_contents = | 247 content::WebContents* web_contents = |
248 browser->tab_strip_model()->GetActiveWebContents(); | 248 browser->tab_strip_model()->GetActiveWebContents(); |
249 web_contents->GetDelegate()->ActivateContents(web_contents); | 249 web_contents->GetDelegate()->ActivateContents(web_contents); |
250 } | 250 } |
251 | 251 |
252 void CrosLanguageOptionsHandler::AddImeProvider(base::ListValue* list) { | 252 void CrosLanguageOptionsHandler::AddImeProvider(base::ListValue* list) { |
253 Profile* profile = Profile::FromWebUI(web_ui()); | 253 Profile* profile = Profile::FromWebUI(web_ui()); |
(...skipping 10 matching lines...) Expand all Loading... |
264 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id); | 264 extension_ime_util::GetExtensionIDFromInputMethodID(input_method_id); |
265 const extensions::Extension* extension = | 265 const extensions::Extension* extension = |
266 enabled_extensions.GetByID(extension_id); | 266 enabled_extensions.GetByID(extension_id); |
267 if (extension) | 267 if (extension) |
268 entry->SetString("extensionName", extension->name()); | 268 entry->SetString("extensionName", extension->name()); |
269 } | 269 } |
270 } | 270 } |
271 | 271 |
272 } // namespace options | 272 } // namespace options |
273 } // namespace chromeos | 273 } // namespace chromeos |
OLD | NEW |