summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser_init.cc
diff options
context:
space:
mode:
authordavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:01:45 +0000
committerdavemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 20:01:45 +0000
commit56d83182c6d4c815aab837e82ccccc6103bc4b6a (patch)
tree34944feee64dfe06f287c1ab6a063144e4c3958f /chrome/browser/browser_init.cc
parent42f4f8bc7eb5b3d7e5af6b066c13e70d39e60d5d (diff)
downloadchromium_src-56d83182c6d4c815aab837e82ccccc6103bc4b6a.zip
chromium_src-56d83182c6d4c815aab837e82ccccc6103bc4b6a.tar.gz
chromium_src-56d83182c6d4c815aab837e82ccccc6103bc4b6a.tar.bz2
Intercept HTTP requests for documents that GView is capable of displaying (such
as pdf) and redirect the user to the appropriate URL for viewing. Original patch by skrulx@gmail.com http://codereview.chromium.org/174016 Review URL: http://codereview.chromium.org/199019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25496 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser_init.cc')
-rw-r--r--chrome/browser/browser_init.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/chrome/browser/browser_init.cc b/chrome/browser/browser_init.cc
index 0accf67..2d87070 100644
--- a/chrome/browser/browser_init.cc
+++ b/chrome/browser/browser_init.cc
@@ -65,6 +65,7 @@
#endif
#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/gview_request_interceptor.h"
#include "chrome/browser/views/tabs/tab_overview_message_listener.h"
#endif
@@ -349,6 +350,13 @@ bool LaunchBrowser(const CommandLine& command_line, Profile* profile,
// Create the TabOverviewMessageListener so that it can listen for messages
// regardless of what window has focus.
TabOverviewMessageListener::instance();
+
+ // Install the GView request interceptor that will redirect requests
+ // of compatible documents (PDF, etc) to the GView document viewer.
+ const CommandLine& parsed_command_line = *CommandLine::ForCurrentProcess();
+ if (parsed_command_line.HasSwitch(switches::kEnableGView)) {
+ GViewRequestInterceptor::GetGViewRequestInterceptor();
+ }
#endif
return true;
}