diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 22:25:49 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-06 22:25:49 +0000 |
commit | 3fdc4622a767c714139fefe9fa74e644836d3e91 (patch) | |
tree | 728b64120c173e0a20054055f2b39c8c76e43bc0 /content/shell/shell_win.cc | |
parent | a96790b07c2b8212ac65601e05a4759597aa8662 (diff) | |
download | chromium_src-3fdc4622a767c714139fefe9fa74e644836d3e91.zip chromium_src-3fdc4622a767c714139fefe9fa74e644836d3e91.tar.gz chromium_src-3fdc4622a767c714139fefe9fa74e644836d3e91.tar.bz2 |
Initial changes for Mac content shell.
BUG=90445
TEST=none
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=104359
Review URL: http://codereview.chromium.org/8171012
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@104379 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/shell/shell_win.cc')
-rw-r--r-- | content/shell/shell_win.cc | 26 |
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; } |