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

Unified Diff: content/shell/shell.cc

Issue 15702006: [content shell] add support for running headless on mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: updates Created 7 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 | « content/shell/shell.h ('k') | content/shell/shell_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/shell.cc
diff --git a/content/shell/shell.cc b/content/shell/shell.cc
index 4911043f18ac090811ef6432a65557735a24b890..d1e691b21432217ee180354ece9bfd4a6e45c972 100644
--- a/content/shell/shell.cc
+++ b/content/shell/shell.cc
@@ -32,12 +32,11 @@
#include "content/shell/shell_javascript_dialog_manager.h"
#include "content/shell/webkit_test_controller.h"
-// Content area size for newly created windows.
-static const int kTestWindowWidth = 800;
-static const int kTestWindowHeight = 600;
-
namespace content {
+const int Shell::kDefaultTestWindowWidthDip = 800;
+const int Shell::kDefaultTestWindowHeightDip = 600;
+
std::vector<Shell*> Shell::windows_;
base::Callback<void(Shell*)> Shell::shell_created_callback_;
@@ -147,7 +146,8 @@ Shell* Shell::FromRenderViewHost(RenderViewHost* rvh) {
// static
void Shell::Initialize() {
- PlatformInitialize(gfx::Size(kTestWindowWidth, kTestWindowHeight));
+ PlatformInitialize(
+ gfx::Size(kDefaultTestWindowWidthDip, kDefaultTestWindowHeightDip));
}
Shell* Shell::CreateNewWindow(BrowserContext* browser_context,
@@ -160,7 +160,8 @@ Shell* Shell::CreateNewWindow(BrowserContext* browser_context,
if (!initial_size.IsEmpty())
create_params.initial_size = initial_size;
else
- create_params.initial_size = gfx::Size(kTestWindowWidth, kTestWindowHeight);
+ create_params.initial_size =
+ gfx::Size(kDefaultTestWindowWidthDip, kDefaultTestWindowHeightDip);
WebContents* web_contents = WebContents::Create(create_params);
Shell* shell = CreateShell(web_contents, create_params.initial_size);
if (!url.is_empty())
« no previous file with comments | « content/shell/shell.h ('k') | content/shell/shell_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698