| Index: ui/arc/notification/arc_notification_surface_impl.cc
|
| diff --git a/ui/arc/notification/arc_notification_surface_impl.cc b/ui/arc/notification/arc_notification_surface_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..8864fd2217254ff22e123455f7b49d16fb67e112
|
| --- /dev/null
|
| +++ b/ui/arc/notification/arc_notification_surface_impl.cc
|
| @@ -0,0 +1,37 @@
|
| +// 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.
|
| +
|
| +#include "ui/arc/notification/arc_notification_surface_impl.h"
|
| +
|
| +#include "base/logging.h"
|
| +#include "components/exo/notification_surface.h"
|
| +#include "ui/views/controls/native/native_view_host.h"
|
| +
|
| +namespace arc {
|
| +
|
| +// Handles notification surface role of a given surface.
|
| +ArcNotificationSurfaceImpl::ArcNotificationSurfaceImpl(
|
| + exo::NotificationSurface* surface)
|
| + : surface_(surface) {
|
| + DCHECK(surface);
|
| +}
|
| +
|
| +gfx::Size ArcNotificationSurfaceImpl::GetSize() const {
|
| + return surface_->GetSize();
|
| +}
|
| +
|
| +void ArcNotificationSurfaceImpl::AttachWindow(
|
| + views::NativeViewHost* native_view_host) {
|
| + return native_view_host->Attach(surface_->window());
|
| +}
|
| +
|
| +aura::Window* ArcNotificationSurfaceImpl::GetWindow() const {
|
| + return surface_->window();
|
| +}
|
| +
|
| +const std::string& ArcNotificationSurfaceImpl::GetNotificationId() const {
|
| + return surface_->notification_id();
|
| +}
|
| +
|
| +} // namespace arc
|
|
|