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

Side by Side Diff: chrome/browser/extensions/api/omnibox/omnibox_api.cc

Issue 10409023: Remove extension application launch code from Browser (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 8 years, 7 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 | Annotate | Revision Log
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/extensions/api/omnibox/omnibox_api.h" 5 #include "chrome/browser/extensions/api/omnibox/omnibox_api.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "base/metrics/histogram.h" 9 #include "base/metrics/histogram.h"
10 #include "base/string_util.h" 10 #include "base/string_util.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 #include "base/values.h" 12 #include "base/values.h"
13 #include "chrome/browser/extensions/extension_event_router.h" 13 #include "chrome/browser/extensions/extension_event_router.h"
14 #include "chrome/browser/extensions/extension_prefs.h" 14 #include "chrome/browser/extensions/extension_prefs.h"
15 #include "chrome/browser/extensions/extension_service.h" 15 #include "chrome/browser/extensions/extension_service.h"
16 #include "chrome/browser/extensions/extension_system.h" 16 #include "chrome/browser/extensions/extension_system.h"
17 #include "chrome/browser/profiles/profile.h" 17 #include "chrome/browser/profiles/profile.h"
18 #include "chrome/browser/search_engines/template_url.h" 18 #include "chrome/browser/search_engines/template_url.h"
19 #include "chrome/browser/ui/browser.h" 19 #include "chrome/browser/ui/extensions/application_launch.h"
20 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h" 20 #include "chrome/browser/ui/webui/ntp/app_launcher_handler.h"
21 #include "chrome/common/chrome_notification_types.h" 21 #include "chrome/common/chrome_notification_types.h"
22 #include "chrome/common/extensions/extension_constants.h" 22 #include "chrome/common/extensions/extension_constants.h"
23 #include "content/public/browser/notification_service.h" 23 #include "content/public/browser/notification_service.h"
24 24
25 namespace events { 25 namespace events {
26 const char kOnInputStarted[] = "omnibox.onInputStarted"; 26 const char kOnInputStarted[] = "omnibox.onInputStarted";
27 const char kOnInputChanged[] = "omnibox.onInputChanged"; 27 const char kOnInputChanged[] = "omnibox.onInputChanged";
28 const char kOnInputEntered[] = "omnibox.onInputEntered"; 28 const char kOnInputEntered[] = "omnibox.onInputEntered";
29 const char kOnInputCancelled[] = "omnibox.onInputCancelled"; 29 const char kOnInputCancelled[] = "omnibox.onInputCancelled";
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
313 313
314 AppLauncherHandler::RecordAppLaunchType( 314 AppLauncherHandler::RecordAppLaunchType(
315 extension_misc::APP_LAUNCH_OMNIBOX_APP); 315 extension_misc::APP_LAUNCH_OMNIBOX_APP);
316 316
317 // Look at the preferences to find the right launch container. If no 317 // Look at the preferences to find the right launch container. If no
318 // preference is set, launch as a regular tab. 318 // preference is set, launch as a regular tab.
319 extension_misc::LaunchContainer launch_container = 319 extension_misc::LaunchContainer launch_container =
320 service->extension_prefs()->GetLaunchContainer( 320 service->extension_prefs()->GetLaunchContainer(
321 extension, ExtensionPrefs::LAUNCH_REGULAR); 321 extension, ExtensionPrefs::LAUNCH_REGULAR);
322 322
323 Browser::OpenApplication(profile, extension, launch_container, GURL(), 323 application_launch::OpenApplication(profile, extension, launch_container,
324 disposition); 324 GURL(), disposition);
325 } 325 }
326 326
327 } // namespace extensions 327 } // namespace extensions
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/extensions/file_manager_util.cc ('k') | chrome/browser/extensions/app_notification_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698