Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this |
| 2 // source code is governed by a BSD-style license that can be found in the | 2 // source code is governed by a BSD-style license that can be found in the |
| 3 // LICENSE file. | 3 // LICENSE file. |
| 4 | 4 |
| 5 #include "views/controls/menu/native_menu_win.h" | 5 #include "views/controls/menu/native_menu_win.h" |
| 6 | 6 |
| 7 #include "app/gfx/canvas.h" | 7 #include "app/gfx/canvas.h" |
| 8 #include "app/gfx/font.h" | 8 #include "app/gfx/font.h" |
| 9 #include "app/l10n_util.h" | 9 #include "app/l10n_util.h" |
| 10 #include "app/l10n_util_win.h" | 10 #include "app/l10n_util_win.h" |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 const wchar_t* NativeMenuWin::MenuHostWindow::kMenuHostWindowKey = | 295 const wchar_t* NativeMenuWin::MenuHostWindow::kMenuHostWindowKey = |
| 296 L"__MENU_HOST_WINDOW__"; | 296 L"__MENU_HOST_WINDOW__"; |
| 297 | 297 |
| 298 | 298 |
| 299 //////////////////////////////////////////////////////////////////////////////// | 299 //////////////////////////////////////////////////////////////////////////////// |
| 300 // NativeMenuWin, public: | 300 // NativeMenuWin, public: |
| 301 | 301 |
| 302 NativeMenuWin::NativeMenuWin(Menu2Model* model, HWND system_menu_for) | 302 NativeMenuWin::NativeMenuWin(Menu2Model* model, HWND system_menu_for) |
| 303 : model_(model), | 303 : model_(model), |
| 304 menu_(NULL), | 304 menu_(NULL), |
| 305 owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL)), | 305 owner_draw_(l10n_util::NeedOverrideDefaultUIFont(NULL, NULL) && |
| 306 !system_menu_for), | |
|
Finnur
2009/09/24 21:14:53
I understand that you don't want the menu to be ow
| |
| 306 system_menu_for_(system_menu_for), | 307 system_menu_for_(system_menu_for), |
| 307 first_item_index_(0) { | 308 first_item_index_(0) { |
| 308 } | 309 } |
| 309 | 310 |
| 310 NativeMenuWin::~NativeMenuWin() { | 311 NativeMenuWin::~NativeMenuWin() { |
| 311 STLDeleteContainerPointers(items_.begin(), items_.end()); | 312 STLDeleteContainerPointers(items_.begin(), items_.end()); |
| 312 DestroyMenu(menu_); | 313 DestroyMenu(menu_); |
| 313 } | 314 } |
| 314 | 315 |
| 315 //////////////////////////////////////////////////////////////////////////////// | 316 //////////////////////////////////////////////////////////////////////////////// |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 533 | 534 |
| 534 //////////////////////////////////////////////////////////////////////////////// | 535 //////////////////////////////////////////////////////////////////////////////// |
| 535 // MenuWrapper, public: | 536 // MenuWrapper, public: |
| 536 | 537 |
| 537 // static | 538 // static |
| 538 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { | 539 MenuWrapper* MenuWrapper::CreateWrapper(Menu2* menu) { |
| 539 return new NativeMenuWin(menu->model(), NULL); | 540 return new NativeMenuWin(menu->model(), NULL); |
| 540 } | 541 } |
| 541 | 542 |
| 542 } // namespace views | 543 } // namespace views |
| OLD | NEW |