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

Side by Side Diff: apps/launcher.cc

Issue 23847004: "Redirecting URLs to Packaged Apps" implementation: revised (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebasing Created 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "apps/launcher.h" 5 #include "apps/launcher.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 13 matching lines...) Expand all
24 #include "chrome/browser/profiles/profile.h" 24 #include "chrome/browser/profiles/profile.h"
25 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h" 25 #include "chrome/browser/ui/apps/app_metro_infobar_delegate_win.h"
26 #include "chrome/common/extensions/api/app_runtime.h" 26 #include "chrome/common/extensions/api/app_runtime.h"
27 #include "chrome/common/extensions/extension.h" 27 #include "chrome/common/extensions/extension.h"
28 #include "chrome/common/extensions/extension_messages.h" 28 #include "chrome/common/extensions/extension_messages.h"
29 #include "content/public/browser/browser_thread.h" 29 #include "content/public/browser/browser_thread.h"
30 #include "content/public/browser/render_process_host.h" 30 #include "content/public/browser/render_process_host.h"
31 #include "content/public/browser/web_contents.h" 31 #include "content/public/browser/web_contents.h"
32 #include "net/base/mime_util.h" 32 #include "net/base/mime_util.h"
33 #include "net/base/net_util.h" 33 #include "net/base/net_util.h"
34 #include "url/gurl.h"
34 35
35 #if defined(OS_CHROMEOS) 36 #if defined(OS_CHROMEOS)
36 #include "chrome/browser/chromeos/drive/file_errors.h" 37 #include "chrome/browser/chromeos/drive/file_errors.h"
37 #include "chrome/browser/chromeos/drive/file_system_interface.h" 38 #include "chrome/browser/chromeos/drive/file_system_interface.h"
38 #include "chrome/browser/chromeos/drive/file_system_util.h" 39 #include "chrome/browser/chromeos/drive/file_system_util.h"
39 #endif 40 #endif
40 41
41 #if defined(OS_WIN) 42 #if defined(OS_WIN)
42 #include "win8/util/win8_util.h" 43 #include "win8/util/win8_util.h"
43 #endif 44 #endif
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 bool had_windows = extension_prefs->IsActive(extension->id()); 380 bool had_windows = extension_prefs->IsActive(extension->id());
380 extension_prefs->SetIsActive(extension->id(), false); 381 extension_prefs->SetIsActive(extension->id(), false);
381 bool listening_to_launch = event_router-> 382 bool listening_to_launch = event_router->
382 ExtensionHasEventListener(extension->id(), 383 ExtensionHasEventListener(extension->id(),
383 app_runtime::OnLaunched::kEventName); 384 app_runtime::OnLaunched::kEventName);
384 385
385 if (listening_to_launch && had_windows) 386 if (listening_to_launch && had_windows)
386 LaunchPlatformAppWithNoData(profile, extension); 387 LaunchPlatformAppWithNoData(profile, extension);
387 } 388 }
388 389
390 void LaunchPlatformAppWithUrl(Profile* profile,
391 const Extension* extension,
392 const std::string& handler_id,
393 const GURL& url,
394 const GURL& referrer_url) {
395 extensions::AppEventRouter::DispatchOnLaunchedEventWithUrl(
396 profile, extension, handler_id, url, referrer_url);
397 }
398
389 } // namespace apps 399 } // namespace apps
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698