| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <windows.h> | 7 #include <windows.h> |
| 8 #include <commctrl.h> | 8 #include <commctrl.h> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 221 shell->Reload(); | 221 shell->Reload(); |
| 222 break; | 222 break; |
| 223 case IDC_NAV_STOP: | 223 case IDC_NAV_STOP: |
| 224 shell->Stop(); | 224 shell->Stop(); |
| 225 break; | 225 break; |
| 226 } | 226 } |
| 227 break; | 227 break; |
| 228 } | 228 } |
| 229 case WM_DESTROY: { | 229 case WM_DESTROY: { |
| 230 delete shell; | 230 delete shell; |
| 231 if (windows_.empty()) | 231 if (windows_.empty()) { |
| 232 #if defined(TEST_EMBEDDED_MESSAGE_LOOP) |
| 233 // Running our own message loop so quit normally. |
| 234 PostQuitMessage(0); |
| 235 #else |
| 232 MessageLoop::current()->Quit(); | 236 MessageLoop::current()->Quit(); |
| 237 #endif |
| 238 } |
| 233 return 0; | 239 return 0; |
| 234 } | 240 } |
| 235 | 241 |
| 236 case WM_SIZE: { | 242 case WM_SIZE: { |
| 237 if (shell->GetContentView()) | 243 if (shell->GetContentView()) |
| 238 shell->PlatformResizeSubViews(); | 244 shell->PlatformResizeSubViews(); |
| 239 return 0; | 245 return 0; |
| 240 } | 246 } |
| 241 } | 247 } |
| 242 | 248 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 263 | 269 |
| 264 return 0; | 270 return 0; |
| 265 } | 271 } |
| 266 } | 272 } |
| 267 | 273 |
| 268 return CallWindowProc(shell->default_edit_wnd_proc_, hwnd, message, wParam, | 274 return CallWindowProc(shell->default_edit_wnd_proc_, hwnd, message, wParam, |
| 269 lParam); | 275 lParam); |
| 270 } | 276 } |
| 271 | 277 |
| 272 } // namespace content | 278 } // namespace content |
| OLD | NEW |