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

Side by Side Diff: chrome/views/bitmap_scroll_bar.cc

Issue 7317: Change all ConvertPointTo* methods to use gfx::Point instead of CPoint.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
« no previous file with comments | « chrome/views/accessibility/view_accessibility.cc ('k') | chrome/views/button_dropdown.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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/views/bitmap_scroll_bar.h" 5 #include "chrome/views/bitmap_scroll_bar.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/common/gfx/chrome_canvas.h" 8 #include "chrome/common/gfx/chrome_canvas.h"
9 #include "chrome/common/l10n_util.h" 9 #include "chrome/common/l10n_util.h"
10 #include "chrome/views/menu.h" 10 #include "chrome/views/menu.h"
(...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after
535 ScrollBarContextMenuCommand_ScrollPageDown, 535 ScrollBarContextMenuCommand_ScrollPageDown,
536 ScrollBarContextMenuCommand_ScrollPrev, 536 ScrollBarContextMenuCommand_ScrollPrev,
537 ScrollBarContextMenuCommand_ScrollNext 537 ScrollBarContextMenuCommand_ScrollNext
538 }; 538 };
539 539
540 void BitmapScrollBar::ShowContextMenu(View* source, int x, int y, 540 void BitmapScrollBar::ShowContextMenu(View* source, int x, int y,
541 bool is_mouse_gesture) { 541 bool is_mouse_gesture) {
542 ViewContainer* vc = GetViewContainer(); 542 ViewContainer* vc = GetViewContainer();
543 CRect vc_bounds; 543 CRect vc_bounds;
544 vc->GetBounds(&vc_bounds, true); 544 vc->GetBounds(&vc_bounds, true);
545 CPoint temp_pt(x - vc_bounds.left, y - vc_bounds.top); 545 gfx::Point temp_pt(x - vc_bounds.left, y - vc_bounds.top);
546 View::ConvertPointFromViewContainer(this, &temp_pt); 546 View::ConvertPointFromViewContainer(this, &temp_pt);
547 context_menu_mouse_position_ = IsHorizontal() ? temp_pt.x : temp_pt.y; 547 context_menu_mouse_position_ = IsHorizontal() ? temp_pt.x() : temp_pt.y();
548 548
549 Menu menu(this, Menu::TOPLEFT, GetViewContainer()->GetHWND()); 549 Menu menu(this, Menu::TOPLEFT, GetViewContainer()->GetHWND());
550 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollHere); 550 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollHere);
551 menu.AppendSeparator(); 551 menu.AppendSeparator();
552 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollStart); 552 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollStart);
553 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollEnd); 553 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollEnd);
554 menu.AppendSeparator(); 554 menu.AppendSeparator();
555 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageUp); 555 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageUp);
556 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageDown); 556 menu.AppendDelegateMenuItem(ScrollBarContextMenuCommand_ScrollPageDown);
557 menu.AppendSeparator(); 557 menu.AppendSeparator();
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 return (thumb_position * contents_size_) / GetTrackSize(); 705 return (thumb_position * contents_size_) / GetTrackSize();
706 } 706 }
707 707
708 void BitmapScrollBar::SetThumbTrackState(BaseButton::ButtonState state) { 708 void BitmapScrollBar::SetThumbTrackState(BaseButton::ButtonState state) {
709 thumb_track_state_ = state; 709 thumb_track_state_ = state;
710 SchedulePaint(); 710 SchedulePaint();
711 } 711 }
712 712
713 } 713 }
714 714
OLDNEW
« no previous file with comments | « chrome/views/accessibility/view_accessibility.cc ('k') | chrome/views/button_dropdown.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698