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 #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 |
OLD | NEW |