Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: chrome/browser/chromeos/extensions/input_method_api.cc

Issue 2248873002: Convert WindowOpenDisposition to an enum class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/chromeos/extensions/input_method_api.h" 5 #include "chrome/browser/chromeos/extensions/input_method_api.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <utility> 10 #include <utility>
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after
282 ime_state->GetInputMethodFromId(params->input_method_id); 282 ime_state->GetInputMethodFromId(params->input_method_id);
283 if (!ime) 283 if (!ime)
284 return RespondNow(Error("IME not found: *", params->input_method_id)); 284 return RespondNow(Error("IME not found: *", params->input_method_id));
285 285
286 content::WebContents* web_contents = GetSenderWebContents(); 286 content::WebContents* web_contents = GetSenderWebContents();
287 if (web_contents) { 287 if (web_contents) {
288 const GURL& options_page_url = ime->options_page_url(); 288 const GURL& options_page_url = ime->options_page_url();
289 if (!options_page_url.is_empty()) { 289 if (!options_page_url.is_empty()) {
290 Browser* browser = chrome::FindBrowserWithWebContents(web_contents); 290 Browser* browser = chrome::FindBrowserWithWebContents(web_contents);
291 content::OpenURLParams url_params(options_page_url, content::Referrer(), 291 content::OpenURLParams url_params(options_page_url, content::Referrer(),
292 SINGLETON_TAB, ui::PAGE_TRANSITION_LINK, 292 WindowOpenDisposition::SINGLETON_TAB,
293 false); 293 ui::PAGE_TRANSITION_LINK, false);
294 browser->OpenURL(url_params); 294 browser->OpenURL(url_params);
295 } 295 }
296 } 296 }
297 return RespondNow(NoArguments()); 297 return RespondNow(NoArguments());
298 #endif 298 #endif
299 } 299 }
300 300
301 InputMethodAPI::InputMethodAPI(content::BrowserContext* context) 301 InputMethodAPI::InputMethodAPI(content::BrowserContext* context)
302 : context_(context) { 302 : context_(context) {
303 EventRouter::Get(context_)->RegisterObserver(this, OnChanged::kEventName); 303 EventRouter::Get(context_)->RegisterObserver(this, OnChanged::kEventName);
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> > 369 static base::LazyInstance<BrowserContextKeyedAPIFactory<InputMethodAPI> >
370 g_factory = LAZY_INSTANCE_INITIALIZER; 370 g_factory = LAZY_INSTANCE_INITIALIZER;
371 371
372 // static 372 // static
373 BrowserContextKeyedAPIFactory<InputMethodAPI>* 373 BrowserContextKeyedAPIFactory<InputMethodAPI>*
374 InputMethodAPI::GetFactoryInstance() { 374 InputMethodAPI::GetFactoryInstance() {
375 return g_factory.Pointer(); 375 return g_factory.Pointer();
376 } 376 }
377 377
378 } // namespace extensions 378 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/echo_private_api.cc ('k') | chrome/browser/chromeos/extensions/wallpaper_manager_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698