| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "chrome/browser/autocomplete/autocomplete_edit_view_win.h" | 5 #include "chrome/browser/autocomplete/autocomplete_edit_view_win.h" |
| 6 | 6 |
| 7 #include <locale> | 7 #include <locale> |
| 8 | 8 |
| 9 #include "app/clipboard/clipboard.h" | 9 #include "app/clipboard/clipboard.h" |
| 10 #include "app/clipboard/scoped_clipboard_writer.h" | 10 #include "app/clipboard/scoped_clipboard_writer.h" |
| (...skipping 2393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2404 } | 2404 } |
| 2405 } | 2405 } |
| 2406 | 2406 |
| 2407 void AutocompleteEditViewWin::BuildContextMenu() { | 2407 void AutocompleteEditViewWin::BuildContextMenu() { |
| 2408 if (context_menu_contents_.get()) | 2408 if (context_menu_contents_.get()) |
| 2409 return; | 2409 return; |
| 2410 | 2410 |
| 2411 context_menu_contents_.reset(new menus::SimpleMenuModel(this)); | 2411 context_menu_contents_.reset(new menus::SimpleMenuModel(this)); |
| 2412 // Set up context menu. | 2412 // Set up context menu. |
| 2413 if (popup_window_mode_) { | 2413 if (popup_window_mode_) { |
| 2414 context_menu_contents_->AddItemWithStringId(IDS_COPY, IDS_COPY); | 2414 context_menu_contents_->AddItemWithStringId(IDC_COPY, IDS_COPY); |
| 2415 } else { | 2415 } else { |
| 2416 context_menu_contents_->AddItemWithStringId(IDS_UNDO, IDS_UNDO); | 2416 context_menu_contents_->AddItemWithStringId(IDS_UNDO, IDS_UNDO); |
| 2417 context_menu_contents_->AddSeparator(); | 2417 context_menu_contents_->AddSeparator(); |
| 2418 context_menu_contents_->AddItemWithStringId(IDC_CUT, IDS_CUT); | 2418 context_menu_contents_->AddItemWithStringId(IDC_CUT, IDS_CUT); |
| 2419 context_menu_contents_->AddItemWithStringId(IDC_COPY, IDS_COPY); | 2419 context_menu_contents_->AddItemWithStringId(IDC_COPY, IDS_COPY); |
| 2420 context_menu_contents_->AddItemWithStringId(IDC_PASTE, IDS_PASTE); | 2420 context_menu_contents_->AddItemWithStringId(IDC_PASTE, IDS_PASTE); |
| 2421 // GetContextualLabel() will override this next label with the | 2421 // GetContextualLabel() will override this next label with the |
| 2422 // IDS_PASTE_AND_SEARCH label as needed. | 2422 // IDS_PASTE_AND_SEARCH label as needed. |
| 2423 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO, | 2423 context_menu_contents_->AddItemWithStringId(IDS_PASTE_AND_GO, |
| 2424 IDS_PASTE_AND_GO); | 2424 IDS_PASTE_AND_GO); |
| 2425 context_menu_contents_->AddSeparator(); | 2425 context_menu_contents_->AddSeparator(); |
| 2426 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL); | 2426 context_menu_contents_->AddItemWithStringId(IDS_SELECT_ALL, IDS_SELECT_ALL); |
| 2427 context_menu_contents_->AddSeparator(); | 2427 context_menu_contents_->AddSeparator(); |
| 2428 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES, | 2428 context_menu_contents_->AddItemWithStringId(IDS_EDIT_SEARCH_ENGINES, |
| 2429 IDS_EDIT_SEARCH_ENGINES); | 2429 IDS_EDIT_SEARCH_ENGINES); |
| 2430 } | 2430 } |
| 2431 context_menu_.reset(new views::Menu2(context_menu_contents_.get())); | 2431 context_menu_.reset(new views::Menu2(context_menu_contents_.get())); |
| 2432 } | 2432 } |
| OLD | NEW |