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

Side by Side Diff: chrome/browser/android/compositor/resources/toolbar_resource.cc

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 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 #include "chrome/browser/android/compositor/resources/toolbar_resource.h"
6
7 #include "base/memory/ptr_util.h"
8
9 namespace android {
10
11 // static
12 ToolbarResource* ToolbarResource::From(ui::Resource* resource) {
13 DCHECK_EQ(Type::TOOLBAR, resource->type());
14 return static_cast<ToolbarResource*>(resource);
15 }
16
17 ToolbarResource::ToolbarResource(gfx::Rect toolbar_rect,
18 gfx::Rect location_bar_content_rect,
19 int shadow_height)
20 : Resource(Type::TOOLBAR),
21 toolbar_rect_(toolbar_rect),
22 location_bar_content_rect_(location_bar_content_rect),
23 shadow_height_(shadow_height) {}
24
25 ToolbarResource::~ToolbarResource() = default;
26
27 std::unique_ptr<ui::Resource> ToolbarResource::CreateForCopy() {
28 return base::MakeUnique<ToolbarResource>(
29 toolbar_rect_, location_bar_content_rect_, shadow_height_);
30 }
31
32 } // namespace android
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698