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

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

Issue 9562038: ui/gfx: Make gfx::Canvas inherit from gfx::CanvasSkia. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: more fixes Created 8 years, 9 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "ui/views/controls/combobox/combobox.h" 5 #include "ui/views/controls/combobox/combobox.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "ui/base/accessibility/accessible_view_state.h" 9 #include "ui/base/accessibility/accessible_view_state.h"
10 #include "ui/base/keycodes/keyboard_codes.h" 10 #include "ui/base/keycodes/keyboard_codes.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 // VKEY_ESCAPE should be handled by this view when the drop down list is active. 85 // VKEY_ESCAPE should be handled by this view when the drop down list is active.
86 // In other words, the list should be closed instead of the dialog. 86 // In other words, the list should be closed instead of the dialog.
87 bool Combobox::SkipDefaultKeyEventProcessing(const KeyEvent& e) { 87 bool Combobox::SkipDefaultKeyEventProcessing(const KeyEvent& e) {
88 if (e.key_code() != ui::VKEY_ESCAPE || 88 if (e.key_code() != ui::VKEY_ESCAPE ||
89 e.IsShiftDown() || e.IsControlDown() || e.IsAltDown()) { 89 e.IsShiftDown() || e.IsControlDown() || e.IsAltDown()) {
90 return false; 90 return false;
91 } 91 }
92 return native_wrapper_ && native_wrapper_->IsDropdownOpen(); 92 return native_wrapper_ && native_wrapper_->IsDropdownOpen();
93 } 93 }
94 94
95 void Combobox::OnPaintFocusBorder(gfx::Canvas* canvas) { 95 void Combobox::OnPaintFocusBorder(gfx::CanvasSkia* canvas) {
96 if (NativeViewHost::kRenderNativeControlFocus) 96 if (NativeViewHost::kRenderNativeControlFocus)
97 View::OnPaintFocusBorder(canvas); 97 View::OnPaintFocusBorder(canvas);
98 } 98 }
99 99
100 bool Combobox::OnKeyPressed(const views::KeyEvent& e) { 100 bool Combobox::OnKeyPressed(const views::KeyEvent& e) {
101 return native_wrapper_ && native_wrapper_->HandleKeyPressed(e); 101 return native_wrapper_ && native_wrapper_->HandleKeyPressed(e);
102 } 102 }
103 103
104 bool Combobox::OnKeyReleased(const views::KeyEvent& e) { 104 bool Combobox::OnKeyReleased(const views::KeyEvent& e) {
105 return native_wrapper_ && native_wrapper_->HandleKeyReleased(e); 105 return native_wrapper_ && native_wrapper_->HandleKeyReleased(e);
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 native_wrapper_->UpdateSelectedItem(); 140 native_wrapper_->UpdateSelectedItem();
141 native_wrapper_->UpdateEnabled(); 141 native_wrapper_->UpdateEnabled();
142 } 142 }
143 } 143 }
144 144
145 std::string Combobox::GetClassName() const { 145 std::string Combobox::GetClassName() const {
146 return kViewClassName; 146 return kViewClassName;
147 } 147 }
148 148
149 } // namespace views 149 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698