OLD | NEW |
(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 CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_ |
| 6 #define CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_ |
| 7 |
| 8 #include "ui/android/resources/resource.h" |
| 9 |
| 10 namespace android { |
| 11 |
| 12 class ToolbarResource final : public ui::Resource { |
| 13 public: |
| 14 static ToolbarResource* From(ui::Resource* resource); |
| 15 |
| 16 ToolbarResource(gfx::Rect toolbar_rect, |
| 17 gfx::Rect location_bar_content_rect, |
| 18 int shadow_height); |
| 19 ~ToolbarResource() override; |
| 20 |
| 21 std::unique_ptr<ui::Resource> CreateForCopy() override; |
| 22 |
| 23 gfx::Rect toolbar_rect() const { return toolbar_rect_; } |
| 24 gfx::Rect location_bar_content_rect() const { |
| 25 return location_bar_content_rect_; |
| 26 } |
| 27 int shadow_height() const { return shadow_height_; } |
| 28 |
| 29 private: |
| 30 // All rects are in the Toolbar container's space. |
| 31 gfx::Rect toolbar_rect_; |
| 32 gfx::Rect location_bar_content_rect_; |
| 33 int shadow_height_; |
| 34 }; |
| 35 |
| 36 } // namespace android |
| 37 |
| 38 #endif // CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_ |
OLD | NEW |