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

Unified Diff: components/native_viewport/platform_viewport_headless.cc

Issue 1131523007: Move NativeViewport service into view_manager. This is a file move only. Further merging will happe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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: components/native_viewport/platform_viewport_headless.cc
diff --git a/components/native_viewport/platform_viewport_headless.cc b/components/native_viewport/platform_viewport_headless.cc
deleted file mode 100644
index f9dd4a0def5c72cf55c64308a4947c8f6ba23ffd..0000000000000000000000000000000000000000
--- a/components/native_viewport/platform_viewport_headless.cc
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2013 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 "components/native_viewport/platform_viewport_headless.h"
-
-#include "mojo/converters/geometry/geometry_type_converters.h"
-
-namespace native_viewport {
-
-PlatformViewportHeadless::PlatformViewportHeadless(Delegate* delegate)
- : delegate_(delegate) {
-}
-
-PlatformViewportHeadless::~PlatformViewportHeadless() {
-}
-
-void PlatformViewportHeadless::Init(const gfx::Rect& bounds) {
- metrics_ = mojo::ViewportMetrics::New();
- metrics_->device_pixel_ratio = 1.f;
- metrics_->size = mojo::Size::From(bounds.size());
-}
-
-void PlatformViewportHeadless::Show() {
-}
-
-void PlatformViewportHeadless::Hide() {
-}
-
-void PlatformViewportHeadless::Close() {
- delegate_->OnDestroyed();
-}
-
-gfx::Size PlatformViewportHeadless::GetSize() {
- return metrics_->size.To<gfx::Size>();
-}
-
-void PlatformViewportHeadless::SetBounds(const gfx::Rect& bounds) {
- metrics_->size = mojo::Size::From(bounds.size());
- delegate_->OnMetricsChanged(metrics_->Clone());
-}
-
-// static
-scoped_ptr<PlatformViewport> PlatformViewportHeadless::Create(
- Delegate* delegate) {
- return scoped_ptr<PlatformViewport>(
- new PlatformViewportHeadless(delegate)).Pass();
-}
-
-} // namespace native_viewport
« no previous file with comments | « components/native_viewport/platform_viewport_headless.h ('k') | components/native_viewport/platform_viewport_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698