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

Side by Side Diff: ui/views/view.cc

Issue 303543004: MacViews: views_examples_with_content_exe working! Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add files Created 6 years, 6 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 | « ui/views/test/test_views_delegate_mac.cc ('k') | ui/views/view_unittest.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) 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 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first. 5 #define _USE_MATH_DEFINES // For VC++ to get M_PI. This has to be first.
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <cmath> 10 #include <cmath>
(...skipping 1435 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 1446
1447 if (focus_manager) 1447 if (focus_manager)
1448 RegisterPendingAccelerators(); 1448 RegisterPendingAccelerators();
1449 } 1449 }
1450 } 1450 }
1451 1451
1452 // Painting -------------------------------------------------------------------- 1452 // Painting --------------------------------------------------------------------
1453 1453
1454 void View::PaintChildren(gfx::Canvas* canvas, const CullSet& cull_set) { 1454 void View::PaintChildren(gfx::Canvas* canvas, const CullSet& cull_set) {
1455 TRACE_EVENT1("views", "View::PaintChildren", "class", GetClassName()); 1455 TRACE_EVENT1("views", "View::PaintChildren", "class", GetClassName());
1456 for (int i = 0, count = child_count(); i < count; ++i) 1456 for (int i = 0, count = child_count(); i < count; ++i) {
1457 DLOG(INFO) << i << " ==> Paint: " << child_at(i)->GetClassName() << " layer =" << child_at(i)->layer() << " children=" << child_at(i)->child_count();
1457 if (!child_at(i)->layer()) 1458 if (!child_at(i)->layer())
1458 child_at(i)->Paint(canvas, cull_set); 1459 child_at(i)->Paint(canvas, cull_set);
1460 }
1459 } 1461 }
1460 1462
1461 void View::OnPaint(gfx::Canvas* canvas) { 1463 void View::OnPaint(gfx::Canvas* canvas) {
1462 TRACE_EVENT1("views", "View::OnPaint", "class", GetClassName()); 1464 TRACE_EVENT1("views", "View::OnPaint", "class", GetClassName());
1463 OnPaintBackground(canvas); 1465 OnPaintBackground(canvas);
1464 OnPaintBorder(canvas); 1466 OnPaintBorder(canvas);
1465 } 1467 }
1466 1468
1467 void View::OnPaintBackground(gfx::Canvas* canvas) { 1469 void View::OnPaintBackground(gfx::Canvas* canvas) {
1468 if (background_.get()) { 1470 if (background_.get()) {
(...skipping 1066 matching lines...) Expand 10 before | Expand all | Expand 10 after
2535 // Message the RootView to do the drag and drop. That way if we're removed 2537 // Message the RootView to do the drag and drop. That way if we're removed
2536 // the RootView can detect it and avoid calling us back. 2538 // the RootView can detect it and avoid calling us back.
2537 gfx::Point widget_location(event.location()); 2539 gfx::Point widget_location(event.location());
2538 ConvertPointToWidget(this, &widget_location); 2540 ConvertPointToWidget(this, &widget_location);
2539 widget->RunShellDrag(this, data, widget_location, drag_operations, source); 2541 widget->RunShellDrag(this, data, widget_location, drag_operations, source);
2540 // WARNING: we may have been deleted. 2542 // WARNING: we may have been deleted.
2541 return true; 2543 return true;
2542 } 2544 }
2543 2545
2544 } // namespace views 2546 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/test/test_views_delegate_mac.cc ('k') | ui/views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698