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

Unified Diff: services/native_viewport/ozone/platform_viewport_ozone.cc

Issue 1309273005: native_viewport support for ozone (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 4 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: services/native_viewport/ozone/platform_viewport_ozone.cc
diff --git a/services/native_viewport/platform_viewport_ozone.cc b/services/native_viewport/ozone/platform_viewport_ozone.cc
similarity index 94%
rename from services/native_viewport/platform_viewport_ozone.cc
rename to services/native_viewport/ozone/platform_viewport_ozone.cc
index 69cba34157d6890f6fb026d07772b38abdc0c2fd..cbed659458ff65b55322f64f51fc1b29bd0eb275 100644
--- a/services/native_viewport/platform_viewport_ozone.cc
+++ b/services/native_viewport/ozone/platform_viewport_ozone.cc
@@ -50,7 +50,7 @@ class PlatformViewportOzone : public PlatformViewport,
ui::OzonePlatform::GetInstance()->CreatePlatformWindow(this, bounds);
metrics_ = mojo::ViewportMetrics::New();
- metrics_->size = mojo::Size::From(bounds.size());
+ metrics_->size = mojo::Size::From(platform_window_->GetBounds().size());
}
void Show() override { platform_window_->Show(); }
@@ -59,9 +59,7 @@ class PlatformViewportOzone : public PlatformViewport,
void Close() override { platform_window_->Close(); }
- gfx::Size GetSize() override {
- return platform_window_->GetBounds().size();
- }
+ gfx::Size GetSize() override { return platform_window_->GetBounds().size(); }
void SetBounds(const gfx::Rect& bounds) override {
platform_window_->SetBounds(bounds);
@@ -129,8 +127,8 @@ class PlatformViewportOzone : public PlatformViewport,
scoped_ptr<PlatformViewport> PlatformViewport::Create(
mojo::ApplicationImpl* application_,
Delegate* delegate) {
- return scoped_ptr<PlatformViewport>(
- new PlatformViewportOzone(delegate)).Pass();
+ return scoped_ptr<PlatformViewport>(new PlatformViewportOzone(delegate))
+ .Pass();
}
} // namespace native_viewport
« no previous file with comments | « services/native_viewport/ozone/display_manager.cc ('k') | services/native_viewport/platform_viewport_ozone.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698