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

Side by Side Diff: ui/views/touchui/touch_selection_controller_impl.cc

Issue 8476019: ui/gfx: Convert Canvas::DrawRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: reland - WHAT HERE could have broken media_unittests???? 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 | Annotate | Revision Log
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/views/window/custom_frame_view.cc » ('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 "ui/views/touchui/touch_selection_controller_impl.h" 5 #include "ui/views/touchui/touch_selection_controller_impl.h"
6 6
7 #include "base/time.h" 7 #include "base/time.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "grit/ui_strings.h" 9 #include "grit/ui_strings.h"
10 #include "third_party/skia/include/effects/SkGradientShader.h" 10 #include "third_party/skia/include/effects/SkGradientShader.h"
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 SkShader::kRepeat_TileMode); 269 SkShader::kRepeat_TileMode);
270 DCHECK(shader); 270 DCHECK(shader);
271 271
272 SkPaint paint; 272 SkPaint paint;
273 paint.setShader(shader); 273 paint.setShader(shader);
274 shader->unref(); 274 shader->unref();
275 275
276 paint.setStyle(SkPaint::kFill_Style); 276 paint.setStyle(SkPaint::kFill_Style);
277 paint.setXfermodeMode(SkXfermode::kSrc_Mode); 277 paint.setXfermodeMode(SkXfermode::kSrc_Mode);
278 278
279 canvas->DrawRectInt(0, 0, width(), height(), paint); 279 canvas->DrawRect(GetLocalBounds(), paint);
280 #else 280 #else
281 // This is the same as COLOR_TOOLBAR. 281 // This is the same as COLOR_TOOLBAR.
282 canvas->GetSkCanvas()->drawColor(SkColorSetRGB(210, 225, 246), 282 canvas->GetSkCanvas()->drawColor(SkColorSetRGB(210, 225, 246),
283 SkXfermode::kSrc_Mode); 283 SkXfermode::kSrc_Mode);
284 #endif 284 #endif
285 } 285 }
286 286
287 // ButtonListener 287 // ButtonListener
288 virtual void ButtonPressed(Button* sender, const views::Event& event) { 288 virtual void ButtonPressed(Button* sender, const views::Event& event) {
289 controller_->ExecuteCommand(sender->tag()); 289 controller_->ExecuteCommand(sender->tag());
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() { 499 bool TouchSelectionControllerImpl::IsSelectionHandle2Visible() {
500 return selection_handle_2_->IsVisible(); 500 return selection_handle_2_->IsVisible();
501 } 501 }
502 502
503 TouchSelectionController* TouchSelectionController::create( 503 TouchSelectionController* TouchSelectionController::create(
504 TouchSelectionClientView* client_view) { 504 TouchSelectionClientView* client_view) {
505 return new TouchSelectionControllerImpl(client_view); 505 return new TouchSelectionControllerImpl(client_view);
506 } 506 }
507 507
508 } // namespace views 508 } // namespace views
OLDNEW
« no previous file with comments | « ui/gfx/skia_util.cc ('k') | ui/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698