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

Unified Diff: content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc

Issue 470983004: Move blink<->cc bindings to cc/blink (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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: content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc
diff --git a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc b/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc
deleted file mode 100644
index 55a7501b3ad07fb0e05eed07bcd1e99d2ec0ce0d..0000000000000000000000000000000000000000
--- a/content/renderer/compositor_bindings/web_nine_patch_layer_impl.cc
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright 2014 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 "content/renderer/compositor_bindings/web_nine_patch_layer_impl.h"
-
-#include "base/command_line.h"
-#include "cc/base/switches.h"
-#include "cc/layers/nine_patch_layer.h"
-#include "cc/layers/picture_image_layer.h"
-#include "content/renderer/compositor_bindings/web_layer_impl.h"
-#include "content/renderer/compositor_bindings/web_layer_impl_fixed_bounds.h"
-
-namespace content {
-
-WebNinePatchLayerImpl::WebNinePatchLayerImpl() {
- layer_.reset(new WebLayerImpl(cc::NinePatchLayer::Create()));
-}
-
-WebNinePatchLayerImpl::~WebNinePatchLayerImpl() {
-}
-
-blink::WebLayer* WebNinePatchLayerImpl::layer() {
- return layer_.get();
-}
-
-void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap,
- const blink::WebRect& aperture) {
- setBitmap(bitmap);
- setAperture(aperture);
- setBorder(blink::WebRect(aperture.x,
- aperture.y,
- bitmap.width() - aperture.width,
- bitmap.height() - aperture.height));
-}
-
-void WebNinePatchLayerImpl::setBitmap(SkBitmap bitmap) {
- cc::NinePatchLayer* nine_patch =
- static_cast<cc::NinePatchLayer*>(layer_->layer());
- nine_patch->SetBitmap(bitmap);
-}
-
-void WebNinePatchLayerImpl::setAperture(const blink::WebRect& aperture) {
- cc::NinePatchLayer* nine_patch =
- static_cast<cc::NinePatchLayer*>(layer_->layer());
- nine_patch->SetAperture(gfx::Rect(aperture));
-}
-
-void WebNinePatchLayerImpl::setBorder(const blink::WebRect& border) {
- cc::NinePatchLayer* nine_patch =
- static_cast<cc::NinePatchLayer*>(layer_->layer());
- nine_patch->SetBorder(gfx::Rect(border));
-}
-
-void WebNinePatchLayerImpl::setFillCenter(bool fill_center) {
- cc::NinePatchLayer* nine_patch =
- static_cast<cc::NinePatchLayer*>(layer_->layer());
- nine_patch->SetFillCenter(fill_center);
-}
-
-} // namespace content
-

Powered by Google App Engine
This is Rietveld 408576698