Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Side by Side Diff: chrome/browser/views/frame/browser_view.cc

Issue 122027: Remove the Menu object, converting all the remaining callers to use Menu2. I'... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/bookmark_table_view.h ('k') | chrome/browser/views/tabs/tab_renderer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-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/views/frame/browser_view.h" 5 #include "chrome/browser/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 #include "chrome/common/chrome_switches.h" 48 #include "chrome/common/chrome_switches.h"
49 #include "chrome/common/native_window_notification_source.h" 49 #include "chrome/common/native_window_notification_source.h"
50 #include "chrome/common/notification_service.h" 50 #include "chrome/common/notification_service.h"
51 #include "chrome/common/pref_names.h" 51 #include "chrome/common/pref_names.h"
52 #include "chrome/common/pref_service.h" 52 #include "chrome/common/pref_service.h"
53 #include "grit/app_resources.h" 53 #include "grit/app_resources.h"
54 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
55 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
56 #include "grit/theme_resources.h" 56 #include "grit/theme_resources.h"
57 #include "grit/webkit_resources.h" 57 #include "grit/webkit_resources.h"
58 #include "views/controls/menu/menu.h"
59 #if defined(OS_WIN) 58 #if defined(OS_WIN)
60 #include "views/controls/scrollbar/native_scroll_bar.h" 59 #include "views/controls/scrollbar/native_scroll_bar.h"
61 #endif 60 #endif
62 #include "views/fill_layout.h" 61 #include "views/fill_layout.h"
63 #include "views/view.h" 62 #include "views/view.h"
64 #include "views/widget/root_view.h" 63 #include "views/widget/root_view.h"
65 #include "views/window/dialog_delegate.h" 64 #include "views/window/dialog_delegate.h"
66 #if !defined(OS_WIN) 65 #if !defined(OS_WIN)
67 #include "views/window/hit_test.h" 66 #include "views/window/hit_test.h"
68 #endif 67 #endif
(...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 int command_id = iter->second; 453 int command_id = iter->second;
455 if (browser_->command_updater()->SupportsCommand(command_id) && 454 if (browser_->command_updater()->SupportsCommand(command_id) &&
456 browser_->command_updater()->IsCommandEnabled(command_id)) { 455 browser_->command_updater()->IsCommandEnabled(command_id)) {
457 browser_->ExecuteCommand(command_id); 456 browser_->ExecuteCommand(command_id);
458 return true; 457 return true;
459 } 458 }
460 return false; 459 return false;
461 } 460 }
462 461
463 bool BrowserView::GetAccelerator(int cmd_id, views::Accelerator* accelerator) { 462 bool BrowserView::GetAccelerator(int cmd_id, views::Accelerator* accelerator) {
463 // The standard Ctrl-X, Ctrl-V and Ctrl-C are not defined as accelerators
464 // anywhere so we need to check for them explicitly here.
465 switch (cmd_id) {
466 case IDC_CUT:
467 *accelerator = views::Accelerator(L'X', false, true, false);
468 return true;
469 case IDC_COPY:
470 *accelerator = views::Accelerator(L'C', false, true, false);
471 return true;
472 case IDC_PASTE:
473 *accelerator = views::Accelerator(L'V', false, true, false);
474 return true;
475 }
476 // Else, we retrieve the accelerator information from the accelerator table.
464 std::map<views::Accelerator, int>::iterator it = 477 std::map<views::Accelerator, int>::iterator it =
465 accelerator_table_->begin(); 478 accelerator_table_->begin();
466 for (; it != accelerator_table_->end(); ++it) { 479 for (; it != accelerator_table_->end(); ++it) {
467 if (it->second == cmd_id) { 480 if (it->second == cmd_id) {
468 *accelerator = it->first; 481 *accelerator = it->first;
469 return true; 482 return true;
470 } 483 }
471 } 484 }
472 return false; 485 return false;
473 } 486 }
(...skipping 1306 matching lines...) Expand 10 before | Expand all | Expand 10 after
1780 1793
1781 // static 1794 // static
1782 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 1795 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
1783 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 1796 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
1784 } 1797 }
1785 1798
1786 // static 1799 // static
1787 void BrowserList::AllBrowsersClosed() { 1800 void BrowserList::AllBrowsersClosed() {
1788 views::Window::CloseAllSecondaryWindows(); 1801 views::Window::CloseAllSecondaryWindows();
1789 } 1802 }
OLDNEW
« no previous file with comments | « chrome/browser/views/bookmark_table_view.h ('k') | chrome/browser/views/tabs/tab_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698