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

Side by Side Diff: views/controls/menu/submenu_view.cc

Issue 8405002: ui/gfx: Convert Canvas::FillRectInt() to use gfx::Rect. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: save some vertical space, interactive_ui_tests are fixed by Peter's fix 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
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/menu/submenu_view.h" 5 #include "views/controls/menu/submenu_view.h"
6 6
7 #include "ui/base/accessibility/accessible_view_state.h" 7 #include "ui/base/accessibility/accessible_view_state.h"
8 #include "ui/gfx/canvas.h" 8 #include "ui/gfx/canvas.h"
9 #include "views/controls/menu/menu_config.h" 9 #include "views/controls/menu/menu_config.h"
10 #include "views/controls/menu/menu_controller.h" 10 #include "views/controls/menu/menu_controller.h"
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 SchedulePaint(); 350 SchedulePaint();
351 } 351 }
352 352
353 void SubmenuView::PaintDropIndicator(gfx::Canvas* canvas, 353 void SubmenuView::PaintDropIndicator(gfx::Canvas* canvas,
354 MenuItemView* item, 354 MenuItemView* item,
355 MenuDelegate::DropPosition position) { 355 MenuDelegate::DropPosition position) {
356 if (position == MenuDelegate::DROP_NONE) 356 if (position == MenuDelegate::DROP_NONE)
357 return; 357 return;
358 358
359 gfx::Rect bounds = CalculateDropIndicatorBounds(item, position); 359 gfx::Rect bounds = CalculateDropIndicatorBounds(item, position);
360 canvas->FillRectInt(kDropIndicatorColor, bounds.x(), bounds.y(), 360 canvas->FillRect(kDropIndicatorColor, bounds);
361 bounds.width(), bounds.height());
362 } 361 }
363 362
364 void SubmenuView::SchedulePaintForDropIndicator( 363 void SubmenuView::SchedulePaintForDropIndicator(
365 MenuItemView* item, 364 MenuItemView* item,
366 MenuDelegate::DropPosition position) { 365 MenuDelegate::DropPosition position) {
367 if (item == NULL) 366 if (item == NULL)
368 return; 367 return;
369 368
370 if (position == MenuDelegate::DROP_ON) { 369 if (position == MenuDelegate::DROP_ON) {
371 item->SchedulePaint(); 370 item->SchedulePaint();
(...skipping 18 matching lines...) Expand all
390 item_bounds.set_height(kDropIndicatorHeight); 389 item_bounds.set_height(kDropIndicatorHeight);
391 return item_bounds; 390 return item_bounds;
392 391
393 default: 392 default:
394 // Don't render anything for on. 393 // Don't render anything for on.
395 return gfx::Rect(); 394 return gfx::Rect();
396 } 395 }
397 } 396 }
398 397
399 } // namespace views 398 } // namespace views
OLDNEW
« no previous file with comments | « views/controls/menu/menu_scroll_view_container.cc ('k') | views/controls/native/native_view_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698