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

Unified Diff: chrome/browser/extensions/extension_tabs_module.cc

Issue 10080017: Switch platform apps from a declarative launch container to handling an onLaunched event. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: remove debug logging code Created 8 years, 8 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/extension_prefs.cc ('k') | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.cc
diff --git a/chrome/browser/extensions/extension_tabs_module.cc b/chrome/browser/extensions/extension_tabs_module.cc
index d6a8c5bd46610e9637fc1bb54b46a3de40f840c2..054c58e8c36eb20be6150066abf8bcb835bbcc2e 100644
--- a/chrome/browser/extensions/extension_tabs_module.cc
+++ b/chrome/browser/extensions/extension_tabs_module.cc
@@ -59,6 +59,7 @@
#include "content/public/browser/render_view_host_delegate.h"
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_view.h"
+#include "content/public/common/url_constants.h"
#include "skia/ext/image_operations.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -461,7 +462,7 @@ bool CreateWindowFunction::RunImpl() {
}
// Try to position the new browser relative its originating browser window.
- gfx::Rect window_bounds;
+ gfx::Rect window_bounds;
// The call offsets the bounds by kWindowTilePixels (defined in WindowSizer to
// be 10)
//
@@ -566,10 +567,12 @@ bool CreateWindowFunction::RunImpl() {
window_type = Browser::TYPE_POPUP;
} else if (type_str == keys::kWindowTypeValueShell &&
GetExtension()->is_platform_app()) {
- GURL window_url =
- urls.empty() ? GetExtension()->GetFullLaunchURL() : urls[0];
+ GURL window_url = urls.empty() ? GURL(chrome::kAboutBlankURL) : urls[0];
ShellWindow* shell_window =
ShellWindow::Create(window_profile, GetExtension(), window_url);
+ // TODO(mihaip): It might be less janky to pass in the desired bounds
+ // into ShellWindow::Create directly.
+ shell_window->SetBounds(window_bounds);
result_.reset(shell_window->extension_window_controller()->
CreateWindowValueWithTabs());
return true;
« no previous file with comments | « chrome/browser/extensions/extension_prefs.cc ('k') | chrome/browser/extensions/platform_app_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698