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

Unified Diff: chrome/browser/android/compositor/resources/toolbar_resource.h

Issue 2752693003: chrome/android: Update toolbar drawing in native. (Closed)
Patch Set: .. 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/android/compositor/resources/toolbar_resource.h
diff --git a/chrome/browser/android/compositor/resources/toolbar_resource.h b/chrome/browser/android/compositor/resources/toolbar_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..94f7411a4c669c07f34a3f478d4062b61515b6d7
--- /dev/null
+++ b/chrome/browser/android/compositor/resources/toolbar_resource.h
@@ -0,0 +1,38 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_
+#define CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_
+
+#include "ui/android/resources/resource.h"
+
+namespace android {
+
+class ToolbarResource final : public ui::Resource {
+ public:
+ static ToolbarResource* From(ui::Resource* resource);
+
+ ToolbarResource(gfx::Rect toolbar_rect,
+ gfx::Rect location_bar_content_rect,
+ int shadow_height);
+ ~ToolbarResource() override;
+
+ std::unique_ptr<ui::Resource> CreateForCopy() override;
+
+ gfx::Rect toolbar_rect() const { return toolbar_rect_; }
+ gfx::Rect location_bar_content_rect() const {
+ return location_bar_content_rect_;
+ }
+ int shadow_height() const { return shadow_height_; }
+
+ private:
+ // All rects are in the Toolbar container's space.
+ gfx::Rect toolbar_rect_;
+ gfx::Rect location_bar_content_rect_;
+ int shadow_height_;
+};
+
+} // namespace android
+
+#endif // CHROME_BROWSER_ANDROID_COMPOSITOR_RESOURCES_TOOLBAR_RESOURCE_H_

Powered by Google App Engine
This is Rietveld 408576698