summaryrefslogtreecommitdiffstats
path: root/content/shell/shell_win.cc
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 20:42:03 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-06 20:42:03 +0000
commitc39151a170718795bbe5bf0db16cf69b9f9adc08 (patch)
tree9c6fda6845012610eec73b4df0bb129d2da30590 /content/shell/shell_win.cc
parent52647690519017787e65b22941cbd7dd57b42b5f (diff)
downloadchromium_src-c39151a170718795bbe5bf0db16cf69b9f9adc08.zip
chromium_src-c39151a170718795bbe5bf0db16cf69b9f9adc08.tar.gz
chromium_src-c39151a170718795bbe5bf0db16cf69b9f9adc08.tar.bz2
Initial changes for Mac content shell.
BUG=90445 TEST=none Review URL: http://codereview.chromium.org/8171012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104359 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_win.cc')
-rw-r--r--content/shell/shell_win.cc26
1 files changed, 12 insertions, 14 deletions
diff --git a/content/shell/shell_win.cc b/content/shell/shell_win.cc
index a499189..7a0a1b9 100644
--- a/content/shell/shell_win.cc
+++ b/content/shell/shell_win.cc
@@ -22,13 +22,13 @@
namespace {
-static const wchar_t kWindowTitle[] = L"Content Shell";
-static const wchar_t kWindowClass[] = L"CONTENT_SHELL";
+const wchar_t kWindowTitle[] = L"Content Shell";
+const wchar_t kWindowClass[] = L"CONTENT_SHELL";
-static const int kButtonWidth = 72;
-static const int kURLBarHeight = 24;
+const int kButtonWidth = 72;
+const int kURLBarHeight = 24;
-static const int kMaxURLLength = 1024;
+const int kMaxURLLength = 1024;
static base::StringPiece GetRawDataResource(HMODULE module, int resource_id) {
void* data_ptr;
@@ -94,7 +94,7 @@ void Shell::PlatformSetAddressBarURL(const GURL& url) {
reinterpret_cast<LPARAM>(url_string.c_str()));
}
-void Shell::PlatformCreateWindow() {
+void Shell::PlatformCreateWindow(int width, int height) {
window_ = CreateWindow(kWindowClass, kWindowTitle,
WS_OVERLAPPEDWINDOW | WS_CLIPCHILDREN,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0,
@@ -139,6 +139,8 @@ void Shell::PlatformCreateWindow() {
ui::SetWindowUserData(url_edit_view_, this);
ShowWindow(window_, SW_SHOW);
+
+ PlatformSizeTo(width, height);
}
void Shell::PlatformSizeTo(int width, int height) {
@@ -216,15 +218,11 @@ LRESULT CALLBACK Shell::WndProc(HWND hwnd, UINT message, WPARAM wParam,
shell->GoBackOrForward(1);
break;
case IDC_NAV_RELOAD:
- case IDC_NAV_STOP: {
- if (id == IDC_NAV_RELOAD) {
- shell->Reload();
- } else {
- shell->Stop();
- }
+ shell->Reload();
+ break;
+ case IDC_NAV_STOP:
+ shell->Stop();
break;
- }
- break;
}
break;
}