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

Unified Diff: chrome/browser/ui/webui/chrome_web_ui_factory.cc

Issue 7048015: Fix app process initialization when opening an app in a new tab. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/webui/chrome_web_ui_factory.cc
diff --git a/chrome/browser/ui/webui/chrome_web_ui_factory.cc b/chrome/browser/ui/webui/chrome_web_ui_factory.cc
index 71931fa327f22e02321d9aedf49a32bbfd5f4943..d45ddb1f9fe03b0edc83a26cb698d7198c331441 100644
--- a/chrome/browser/ui/webui/chrome_web_ui_factory.cc
+++ b/chrome/browser/ui/webui/chrome_web_ui_factory.cc
@@ -31,8 +31,10 @@
#include "chrome/common/chrome_switches.h"
#include "chrome/common/extensions/extension_constants.h"
#include "chrome/common/url_constants.h"
+#include "content/browser/content_browser_client.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/webui/web_ui.h"
+#include "content/common/content_client.h"
#include "googleurl/src/gurl.h"
#if defined(OS_CHROMEOS)
@@ -227,7 +229,10 @@ WebUI::TypeID ChromeWebUIFactory::GetWebUIType(Profile* profile,
bool ChromeWebUIFactory::UseWebUIForURL(Profile* profile,
const GURL& url) const {
- return GetWebUIType(profile, url) != WebUI::kNoWebUI;
+ // Convert installed app URLs to extension URLs to classify them properly.
Matt Perry 2011/05/19 22:15:11 Shouldn't this be done in GetWebUIType so that we
Charlie Reis 2011/05/19 23:02:15 Ah, yes, good point. I think it actually belongs
Matt Perry 2011/05/19 23:04:43 Could you verify that we are using the same WebUI
Charlie Reis 2011/05/19 23:53:07 Wow, the WebUI code is kind of hard to follow. I
Matt Perry 2011/05/20 00:03:47 WebUI is a way of exposing extra bindings to a tab
Charlie Reis 2011/05/20 15:32:47 Thanks-- that clarifies things. I've added a chec
+ GURL effective_url =
+ content::GetContentClient()->browser()->GetEffectiveURL(profile, url);
+ return GetWebUIType(profile, effective_url) != WebUI::kNoWebUI;
}
bool ChromeWebUIFactory::HasWebUIScheme(const GURL& url) const {
« no previous file with comments | « chrome/browser/extensions/app_process_apitest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698