OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "content/shell/shell.h" | 5 #include "content/shell/shell.h" |
6 | 6 |
7 #include <commctrl.h> | 7 #include <commctrl.h> |
8 #include <fcntl.h> | 8 #include <fcntl.h> |
9 #include <io.h> | 9 #include <io.h> |
10 #include <windows.h> | 10 #include <windows.h> |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 LPARAM lParam) { | 194 LPARAM lParam) { |
195 Shell* shell = static_cast<Shell*>(ui::GetWindowUserData(hwnd)); | 195 Shell* shell = static_cast<Shell*>(ui::GetWindowUserData(hwnd)); |
196 | 196 |
197 switch (message) { | 197 switch (message) { |
198 case WM_COMMAND: { | 198 case WM_COMMAND: { |
199 int id = LOWORD(wParam); | 199 int id = LOWORD(wParam); |
200 switch (id) { | 200 switch (id) { |
201 case IDM_NEW_WINDOW: | 201 case IDM_NEW_WINDOW: |
202 CreateNewWindow( | 202 CreateNewWindow( |
203 shell->web_contents()->GetBrowserContext(), | 203 shell->web_contents()->GetBrowserContext(), |
204 GURL(), NULL, MSG_ROUTING_NONE, NULL); | 204 GURL(), NULL, MSG_ROUTING_NONE, gfx::Size()); |
205 break; | 205 break; |
206 case IDM_CLOSE_WINDOW: | 206 case IDM_CLOSE_WINDOW: |
207 DestroyWindow(hwnd); | 207 DestroyWindow(hwnd); |
208 break; | 208 break; |
209 case IDM_EXIT: | 209 case IDM_EXIT: |
210 PlatformExit(); | 210 PlatformExit(); |
211 break; | 211 break; |
212 case IDM_SHOW_DEVELOPER_TOOLS: | 212 case IDM_SHOW_DEVELOPER_TOOLS: |
213 shell->ShowDevTools(); | 213 shell->ShowDevTools(); |
214 break; | 214 break; |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 | 276 |
277 return CallWindowProc(shell->default_edit_wnd_proc_, hwnd, message, wParam, | 277 return CallWindowProc(shell->default_edit_wnd_proc_, hwnd, message, wParam, |
278 lParam); | 278 lParam); |
279 } | 279 } |
280 | 280 |
281 void Shell::PlatformSetTitle(const string16& text) { | 281 void Shell::PlatformSetTitle(const string16& text) { |
282 ::SetWindowText(window_, text.c_str()); | 282 ::SetWindowText(window_, text.c_str()); |
283 } | 283 } |
284 | 284 |
285 } // namespace content | 285 } // namespace content |
OLD | NEW |