OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |