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

Side by Side Diff: ui/arc/notification/arc_notification_surface_impl.cc

Issue 2723143002: Add unittests of ArcCustomNotificationView (Closed)
Patch Set: wip Created 3 years, 6 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 "ui/arc/notification/arc_notification_surface_impl.h"
6
7 #include "base/logging.h"
8 #include "components/exo/notification_surface.h"
9 #include "ui/views/controls/native/native_view_host.h"
10
11 namespace arc {
12
13 // Handles notification surface role of a given surface.
14 ArcNotificationSurfaceImpl::ArcNotificationSurfaceImpl(
15 exo::NotificationSurface* surface)
16 : surface_(surface) {
17 DCHECK(surface);
18 }
19
20 gfx::Size ArcNotificationSurfaceImpl::GetSize() const {
21 return surface_->GetSize();
22 }
23
24 void ArcNotificationSurfaceImpl::AttachWindow(
25 views::NativeViewHost* native_view_host) {
26 return native_view_host->Attach(surface_->window());
27 }
28
29 aura::Window* ArcNotificationSurfaceImpl::GetWindow() const {
30 return surface_->window();
31 }
32
33 const std::string& ArcNotificationSurfaceImpl::GetNotificationId() const {
34 return surface_->notification_id();
35 }
36
37 } // namespace arc
OLDNEW
« no previous file with comments | « ui/arc/notification/arc_notification_surface_impl.h ('k') | ui/arc/notification/arc_notification_surface_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698