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

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

Issue 2591863003: Use nine-patch resource for drawing Aura overlay scrollbar thumb. (Closed)
Patch Set: Finish Plumbing Created 4 years 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 4566 matching lines...) Expand 10 before | Expand all | Expand 10 after
4577 State state, 4577 State state,
4578 const ExtraParams& extra) const override { 4578 const ExtraParams& extra) const override {
4579 return gfx::Size(); 4579 return gfx::Size();
4580 } 4580 }
4581 void Paint(SkCanvas* canvas, 4581 void Paint(SkCanvas* canvas,
4582 Part part, 4582 Part part,
4583 State state, 4583 State state,
4584 const gfx::Rect& rect, 4584 const gfx::Rect& rect,
4585 const ExtraParams& extra) const override {} 4585 const ExtraParams& extra) const override {}
4586 4586
4587 bool SupportsNinePatch(Part part) const override { return false; }
4588 gfx::Size GetNinePatchCanvasSize(Part part) const override {
4589 return gfx::Size();
4590 }
4591 gfx::Rect GetNinePatchAperture(Part part) const override {
4592 return gfx::Rect();
4593 }
4594
4587 private: 4595 private:
4588 DISALLOW_COPY_AND_ASSIGN(TestNativeTheme); 4596 DISALLOW_COPY_AND_ASSIGN(TestNativeTheme);
4589 }; 4597 };
4590 4598
4591 // Creates and adds a new child view to |parent| that has a layer. 4599 // Creates and adds a new child view to |parent| that has a layer.
4592 void AddViewWithChildLayer(View* parent) { 4600 void AddViewWithChildLayer(View* parent) {
4593 View* child = new View; 4601 View* child = new View;
4594 child->SetPaintToLayer(true); 4602 child->SetPaintToLayer(true);
4595 parent->AddChildView(child); 4603 parent->AddChildView(child);
4596 } 4604 }
(...skipping 223 matching lines...) Expand 10 before | Expand all | Expand 10 after
4820 std::unique_ptr<View> view = NewView(); 4828 std::unique_ptr<View> view = NewView();
4821 std::unique_ptr<View> child_view = NewView(); 4829 std::unique_ptr<View> child_view = NewView();
4822 std::unique_ptr<View> child_view2 = NewView(); 4830 std::unique_ptr<View> child_view2 = NewView();
4823 view->AddChildView(child_view.get()); 4831 view->AddChildView(child_view.get());
4824 view->AddChildView(child_view2.get()); 4832 view->AddChildView(child_view2.get());
4825 view->ReorderChildView(child_view2.get(), 0); 4833 view->ReorderChildView(child_view2.get(), 0);
4826 EXPECT_EQ(child_view2.get(), view_reordered()); 4834 EXPECT_EQ(child_view2.get(), view_reordered());
4827 } 4835 }
4828 4836
4829 } // namespace views 4837 } // namespace views
OLDNEW
« cc/layers/overlay_scrollbar_layer.h ('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