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

Side by Side Diff: views/controls/combobox/native_combobox_views.cc

Issue 8508055: Move views::Accelerator to ui in order to use it from aura code. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 9 years, 1 month 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
« no previous file with comments | « views/controls/combobox/native_combobox_views.h ('k') | views/controls/menu/menu.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) 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 "views/controls/combobox/native_combobox_views.h" 5 #include "views/controls/combobox/native_combobox_views.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 void NativeComboboxViews::ExecuteCommand(int id) { 256 void NativeComboboxViews::ExecuteCommand(int id) {
257 // revert menu offset to map back to combobox model 257 // revert menu offset to map back to combobox model
258 id -= kFirstMenuItemId; 258 id -= kFirstMenuItemId;
259 DCHECK_LT(id, combobox_->model()->GetItemCount()); 259 DCHECK_LT(id, combobox_->model()->GetItemCount());
260 selected_item_ = id; 260 selected_item_ = id;
261 combobox_->SelectionChanged(); 261 combobox_->SelectionChanged();
262 SchedulePaint(); 262 SchedulePaint();
263 } 263 }
264 264
265 bool NativeComboboxViews::GetAccelerator(int id, views::Accelerator* accel) { 265 bool NativeComboboxViews::GetAccelerator(int id, ui::Accelerator* accel) {
266 return false; 266 return false;
267 } 267 }
268 268
269 ///////////////////////////////////////////////////////////////// 269 /////////////////////////////////////////////////////////////////
270 // NativeComboboxViews private methods: 270 // NativeComboboxViews private methods:
271 271
272 const gfx::Font& NativeComboboxViews::GetFont() const { 272 const gfx::Font& NativeComboboxViews::GetFont() const {
273 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 273 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
274 return rb.GetFont(ResourceBundle::BaseFont); 274 return rb.GetFont(ResourceBundle::BaseFont);
275 } 275 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
377 377
378 #if defined(USE_AURA) 378 #if defined(USE_AURA)
379 // static 379 // static
380 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper( 380 NativeComboboxWrapper* NativeComboboxWrapper::CreateWrapper(
381 Combobox* combobox) { 381 Combobox* combobox) {
382 return new NativeComboboxViews(combobox); 382 return new NativeComboboxViews(combobox);
383 } 383 }
384 #endif 384 #endif
385 385
386 } // namespace views 386 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/combobox/native_combobox_views.h ('k') | views/controls/menu/menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698