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

Side by Side Diff: ui/android/resources/nine_patch_resource.h

Issue 2746483003: ui/android: Fix Resource meta-data sharing with ResourceManager. (Closed)
Patch Set: jni 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
(Empty)
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_ANDROID_RESOURCES_NINE_PATCH_RESOURCE_H_
6 #define UI_ANDROID_RESOURCES_NINE_PATCH_RESOURCE_H_
7
8 #include "ui/android/resources/resource.h"
9 #include "ui/android/ui_android_export.h"
10 #include "ui/gfx/geometry/insets_f.h"
11
12 namespace ui {
13
14 class UI_ANDROID_EXPORT NinePatchResource final : public Resource {
15 public:
16 static NinePatchResource* From(Resource* resource);
17
18 NinePatchResource(gfx::Rect padding, gfx::Rect aperture);
19 ~NinePatchResource() override;
20
21 std::unique_ptr<Resource> CreateForCopy() override;
22
23 gfx::Rect Border(const gfx::Size& bounds) const;
24 gfx::Rect Border(const gfx::Size& bounds, const gfx::InsetsF& scale) const;
25
26 gfx::Rect padding() const { return padding_; }
27 gfx::Rect aperture() const { return aperture_; }
28
29 private:
30 const gfx::Rect padding_;
31 const gfx::Rect aperture_;
32 };
33
34 } // namespace ui
35
36 #endif // UI_ANDROID_RESOURCES_NINE_PATCH_RESOURCE_H_
OLDNEW
« no previous file with comments | « ui/android/java/src/org/chromium/ui/resources/statics/StaticResource.java ('k') | ui/android/resources/nine_patch_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698