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

Unified Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 9845003: Pass command line arguments onto platform apps which provide the right intent. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Include files Created 8 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/extensions/shell_window.cc
diff --git a/chrome/browser/ui/extensions/shell_window.cc b/chrome/browser/ui/extensions/shell_window.cc
index 869f679a0e525f9d8f354b5d0ac35f0687de568e..3dea405f848d5973cd7c480076000a685b7d9805 100644
--- a/chrome/browser/ui/extensions/shell_window.cc
+++ b/chrome/browser/ui/extensions/shell_window.cc
@@ -4,11 +4,12 @@
#include "chrome/browser/ui/extensions/shell_window.h"
-#include "chrome/browser/ui/browser_list.h"
#include "chrome/browser/extensions/extension_process_manager.h"
#include "chrome/browser/extensions/extension_tabs_module_constants.h"
#include "chrome/browser/extensions/extension_window_controller.h"
+#include "chrome/browser/extensions/platform_app_intent_dispatcher.h"
#include "chrome/browser/profiles/profile.h"
+#include "chrome/browser/ui/browser_list.h"
#include "chrome/common/chrome_notification_types.h"
#include "chrome/common/extensions/extension.h"
#include "content/public/browser/notification_details.h"
@@ -118,6 +119,10 @@ void ShellWindow::Observe(int type,
}
}
+void ShellWindow::RenderViewCreated(content::RenderViewHost* render_view_host) {
+ extensions::DispatchPlatformAppIntentData(host_.get());
+}
+
ShellWindow::ShellWindow(ExtensionHost* host)
: host_(host) {
// Close the window in response to window.close() and the like.
@@ -139,6 +144,8 @@ ShellWindow::ShellWindow(ExtensionHost* host)
// Make this window available to the extension API.
extension_window_controller_.reset(
new internal::ShellWindowController(this, host->profile()));
+
+ content::WebContentsObserver::Observe(web_contents());
}
ShellWindow::~ShellWindow() {

Powered by Google App Engine
This is Rietveld 408576698