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

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

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Addressed sadrul@'s feedback Created 3 years, 9 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
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 #include "ui/views/view.h" 5 #include "ui/views/view.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <map> 9 #include <map>
10 #include <memory> 10 #include <memory>
(...skipping 4547 matching lines...) Expand 10 before | Expand all | Expand 10 after
4558 State state, 4558 State state,
4559 const ExtraParams& extra) const override { 4559 const ExtraParams& extra) const override {
4560 return gfx::Size(); 4560 return gfx::Size();
4561 } 4561 }
4562 void Paint(cc::PaintCanvas* canvas, 4562 void Paint(cc::PaintCanvas* canvas,
4563 Part part, 4563 Part part,
4564 State state, 4564 State state,
4565 const gfx::Rect& rect, 4565 const gfx::Rect& rect,
4566 const ExtraParams& extra) const override {} 4566 const ExtraParams& extra) const override {}
4567 4567
4568 bool SupportsNinePatch(Part part) const override { return false; }
4569 gfx::Size GetNinePatchCanvasSize(Part part) const override {
4570 return gfx::Size();
4571 }
4572 gfx::Rect GetNinePatchAperture(Part part) const override {
4573 return gfx::Rect();
4574 }
4575
4568 private: 4576 private:
4569 DISALLOW_COPY_AND_ASSIGN(TestNativeTheme); 4577 DISALLOW_COPY_AND_ASSIGN(TestNativeTheme);
4570 }; 4578 };
4571 4579
4572 // Creates and adds a new child view to |parent| that has a layer. 4580 // Creates and adds a new child view to |parent| that has a layer.
4573 void AddViewWithChildLayer(View* parent) { 4581 void AddViewWithChildLayer(View* parent) {
4574 View* child = new View; 4582 View* child = new View;
4575 child->SetPaintToLayer(); 4583 child->SetPaintToLayer();
4576 parent->AddChildView(child); 4584 parent->AddChildView(child);
4577 } 4585 }
(...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after
4862 std::unique_ptr<View> view = NewView(); 4870 std::unique_ptr<View> view = NewView();
4863 std::unique_ptr<View> child_view = NewView(); 4871 std::unique_ptr<View> child_view = NewView();
4864 std::unique_ptr<View> child_view2 = NewView(); 4872 std::unique_ptr<View> child_view2 = NewView();
4865 view->AddChildView(child_view.get()); 4873 view->AddChildView(child_view.get());
4866 view->AddChildView(child_view2.get()); 4874 view->AddChildView(child_view2.get());
4867 view->ReorderChildView(child_view2.get(), 0); 4875 view->ReorderChildView(child_view2.get(), 0);
4868 EXPECT_EQ(child_view2.get(), view_reordered()); 4876 EXPECT_EQ(child_view2.get(), view_reordered());
4869 } 4877 }
4870 4878
4871 } // namespace views 4879 } // namespace views
OLDNEW
« ui/native_theme/native_theme_win.cc ('K') | « ui/native_theme/native_theme_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698