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

Side by Side Diff: ui/views/controls/textfield/textfield.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/textfield/textfield.h" 5 #include "ui/views/controls/textfield/textfield.h"
6 6
7 #if defined(TOOLKIT_USES_GTK) 7 #if defined(TOOLKIT_USES_GTK)
8 #include <gdk/gdkkeysyms.h> 8 #include <gdk/gdkkeysyms.h>
9 #endif 9 #endif
10 10
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 // We don't translate accelerators for ALT + NumPad digit on Windows, they are 374 // We don't translate accelerators for ALT + NumPad digit on Windows, they are
375 // used for entering special characters. We do translate alt-home. 375 // used for entering special characters. We do translate alt-home.
376 if (e.IsAltDown() && (key != ui::VKEY_HOME) && 376 if (e.IsAltDown() && (key != ui::VKEY_HOME) &&
377 NativeTextfieldWin::IsNumPadDigit(key, 377 NativeTextfieldWin::IsNumPadDigit(key,
378 (e.flags() & ui::EF_EXTENDED) != 0)) 378 (e.flags() & ui::EF_EXTENDED) != 0))
379 return true; 379 return true;
380 #endif 380 #endif
381 return false; 381 return false;
382 } 382 }
383 383
384 void Textfield::OnPaintBackground(gfx::Canvas* canvas) { 384 void Textfield::OnPaintBackground(gfx::CanvasSkia* canvas) {
385 // Overridden to be public - gtk_views_entry.cc wants to call it. 385 // Overridden to be public - gtk_views_entry.cc wants to call it.
386 View::OnPaintBackground(canvas); 386 View::OnPaintBackground(canvas);
387 } 387 }
388 388
389 void Textfield::OnPaintFocusBorder(gfx::Canvas* canvas) { 389 void Textfield::OnPaintFocusBorder(gfx::CanvasSkia* canvas) {
390 if (NativeViewHost::kRenderNativeControlFocus) 390 if (NativeViewHost::kRenderNativeControlFocus)
391 View::OnPaintFocusBorder(canvas); 391 View::OnPaintFocusBorder(canvas);
392 } 392 }
393 393
394 bool Textfield::OnKeyPressed(const views::KeyEvent& e) { 394 bool Textfield::OnKeyPressed(const views::KeyEvent& e) {
395 return native_wrapper_ && native_wrapper_->HandleKeyPressed(e); 395 return native_wrapper_ && native_wrapper_->HandleKeyPressed(e);
396 } 396 }
397 397
398 bool Textfield::OnKeyReleased(const views::KeyEvent& e) { 398 bool Textfield::OnKeyReleased(const views::KeyEvent& e) {
399 return native_wrapper_ && native_wrapper_->HandleKeyReleased(e); 399 return native_wrapper_ && native_wrapper_->HandleKeyReleased(e);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 } 467 }
468 #endif 468 #endif
469 } 469 }
470 } 470 }
471 471
472 std::string Textfield::GetClassName() const { 472 std::string Textfield::GetClassName() const {
473 return kViewClassName; 473 return kViewClassName;
474 } 474 }
475 475
476 } // namespace views 476 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698