summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorstevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 15:31:56 +0000
committerstevet@chromium.org <stevet@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-09-10 15:31:56 +0000
commit43197ea26c3305cc42ba6a2e231f950bcac1e3d2 (patch)
treee99f88d8787bc27e065c1c6bf3b98b97c4ab29fa /apps
parent3a9ab8f95dd88484a7d5c763819232142f6c916f (diff)
downloadchromium_src-43197ea26c3305cc42ba6a2e231f950bcac1e3d2.zip
chromium_src-43197ea26c3305cc42ba6a2e231f950bcac1e3d2.tar.gz
chromium_src-43197ea26c3305cc42ba6a2e231f950bcac1e3d2.tar.bz2
Revert 222257 "Revert 222235 ""Redirecting URLs to Packaged Apps..."
Reason for revert: The first revert didn't actually fix the issues with the Chrome Frame net test failures, so I'm putting the patch back in. > Revert 222235 ""Redirecting URLs to Packaged Apps" implementatio..." > > > "Redirecting URLs to Packaged Apps" implementation: revised > > > > Design proposal: https://docs.google.com/document/d/1r-RoOv2URfZBYrT_B6notQ6MeMqZRd1EP1AITuzJCAc/edit?usp=sharing > > > > * Support for url_handlers in manifest > > * New kind of onLaunched event with navigation info in launch data > > * Intercept/redirect top-level browser-initiated navigations (bookmarks, omnibox, etc.) > > * Intercept/redirect top-frame navigations in tabs and app windows. > > > > This is a rework of https://codereview.chromium.org/22944002/. > > > > BUG=111422 > > > > Review URL: https://chromiumcodereview.appspot.com/23847004 > > Reason for revert: > This is the most likely cause of the chrome_frame_net_tests failures (various tests), since no other changes in the blamelist were touching URLRequest bits. > > First failure here: http://build.chromium.org/p/chromium.win/builders/Chrome%20Frame%20Tests%20%28ie6%29/builds/46826 > > TBR=sergeygs@chromium.org > > Review URL: https://codereview.chromium.org/23600025 TBR=stevet@chromium.org Review URL: https://codereview.chromium.org/23597024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@222258 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'apps')
-rw-r--r--apps/launcher.cc10
-rw-r--r--apps/launcher.h21
2 files changed, 27 insertions, 4 deletions
diff --git a/apps/launcher.cc b/apps/launcher.cc
index 933d37c..aae298f 100644
--- a/apps/launcher.cc
+++ b/apps/launcher.cc
@@ -31,6 +31,7 @@
#include "content/public/browser/web_contents.h"
#include "net/base/mime_util.h"
#include "net/base/net_util.h"
+#include "url/gurl.h"
#if defined(OS_CHROMEOS)
#include "chrome/browser/chromeos/drive/file_errors.h"
@@ -386,4 +387,13 @@ void RestartPlatformApp(Profile* profile, const Extension* extension) {
LaunchPlatformAppWithNoData(profile, extension);
}
+void LaunchPlatformAppWithUrl(Profile* profile,
+ const Extension* extension,
+ const std::string& handler_id,
+ const GURL& url,
+ const GURL& referrer_url) {
+ extensions::AppEventRouter::DispatchOnLaunchedEventWithUrl(
+ profile, extension, handler_id, url, referrer_url);
+}
+
} // namespace apps
diff --git a/apps/launcher.h b/apps/launcher.h
index 9412c11..8da998d 100644
--- a/apps/launcher.h
+++ b/apps/launcher.h
@@ -8,6 +8,7 @@
#include <string>
class CommandLine;
+class GURL;
class Profile;
namespace base {
@@ -29,8 +30,8 @@ void LaunchPlatformAppWithCommandLine(Profile* profile,
const CommandLine* command_line,
const base::FilePath& current_directory);
-// Launches the platform app |extension| with the contents of |file_path|
-// available through the launch data.
+// Launches the platform app |extension| by issuing an onLaunched event
+// with the contents of |file_path| available through the launch data.
void LaunchPlatformAppWithPath(Profile* profile,
const extensions::Extension* extension,
const base::FilePath& file_path);
@@ -39,13 +40,25 @@ void LaunchPlatformAppWithPath(Profile* profile,
void LaunchPlatformApp(Profile* profile,
const extensions::Extension* extension);
-// Launches the platform app |extension| with the contents of |file_path|
-// available through the launch data.
+// Launches the platform app |extension| with |handler_id| and the contents of
+// |file_path| available through the launch data. |handler_id| corresponds to
+// the id of the file_handlers item in the manifest that resulted in a match
+// that triggered this launch.
void LaunchPlatformAppWithFileHandler(Profile* profile,
const extensions::Extension* extension,
const std::string& handler_id,
const base::FilePath& file_path);
+// Launches the platform app |extension| with |handler_id|, |url| and
+// |referrer_url| available through the launch data. |handler_id| corresponds to
+// the id of the file_handlers item in the manifest that resulted in a match
+// that triggered this launch.
+void LaunchPlatformAppWithUrl(Profile* profile,
+ const extensions::Extension* extension,
+ const std::string& handler_id,
+ const GURL& url,
+ const GURL& referrer_url);
+
void RestartPlatformApp(Profile* profile,
const extensions::Extension* extension);