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

Side by Side Diff: chrome/browser/ui/views/tab_contents/render_view_context_menu_views.cc

Issue 7713033: Integrate the Spelling service to Chrome. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 3 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
OLDNEW
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 "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h" 5 #include "chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "chrome/app/chrome_command_ids.h" 8 #include "chrome/app/chrome_command_ids.h"
9 #include "content/browser/renderer_host/render_widget_host_view.h" 9 #include "content/browser/renderer_host/render_widget_host_view.h"
10 #include "content/browser/tab_contents/tab_contents.h" 10 #include "content/browser/tab_contents/tab_contents.h"
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 return true; 103 return true;
104 104
105 case IDC_CONTENT_CONTEXT_SELECTALL: 105 case IDC_CONTENT_CONTEXT_SELECTALL:
106 *accel = views::Accelerator(ui::VKEY_A, false, true, false); 106 *accel = views::Accelerator(ui::VKEY_A, false, true, false);
107 return true; 107 return true;
108 108
109 default: 109 default:
110 return false; 110 return false;
111 } 111 }
112 } 112 }
113
114 void RenderViewContextMenuViews::UpdateMenuItem(int command_id,
115 bool enabled,
116 const string16& title) {
117 views::MenuItemView* item = menu_->GetMenuItemByID(command_id);
118 if (!item)
119 return;
120
121 item->SetEnabled(enabled);
122 item->SetTitle(UTF16ToWide(title));
123
124 views::MenuItemView* parent = item->GetParentMenuItem();
125 if (!parent)
126 return;
127
128 parent->ChildrenChanged();
129 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tab_contents/render_view_context_menu_views.h ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698