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

Unified Diff: athena/system/background_controller.cc

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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
« no previous file with comments | « athena/system/background_controller.h ('k') | athena/system/network_selector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: athena/system/background_controller.cc
diff --git a/athena/system/background_controller.cc b/athena/system/background_controller.cc
deleted file mode 100644
index cb90405120385ce3b6ad9271fd442f821b540ed7..0000000000000000000000000000000000000000
--- a/athena/system/background_controller.cc
+++ /dev/null
@@ -1,72 +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 "athena/system/background_controller.h"
-
-#include "athena/system/public/system_ui.h"
-#include "athena/util/fill_layout_manager.h"
-#include "ui/aura/window.h"
-#include "ui/compositor/layer.h"
-#include "ui/gfx/canvas.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/views/view.h"
-#include "ui/views/widget/widget.h"
-
-namespace athena {
-
-class BackgroundView : public views::View {
- public:
- BackgroundView() {}
- ~BackgroundView() override {}
-
- void SetImage(const gfx::ImageSkia& image) {
- image_ = image;
- SchedulePaint();
- }
-
- // views::View:
- virtual void OnPaint(gfx::Canvas* canvas) override {
- canvas->DrawImageInt(image_,
- 0,
- 0,
- image_.width(),
- image_.height(),
- 0,
- 0,
- width(),
- height(),
- true);
- }
-
- private:
- gfx::ImageSkia image_;
-
- DISALLOW_COPY_AND_ASSIGN(BackgroundView);
-};
-
-BackgroundController::BackgroundController(aura::Window* background_container) {
- views::Widget* background_widget = new views::Widget;
- views::Widget::InitParams params(
- views::Widget::InitParams::TYPE_WINDOW_FRAMELESS);
- params.parent = background_container;
- background_widget->Init(params);
- FillLayoutManager::SetAlwaysFill(background_widget->GetNativeWindow());
- background_widget->GetNativeWindow()->layer()->SetMasksToBounds(true);
- background_view_ = new BackgroundView;
- background_widget->SetContentsView(background_view_);
- background_widget->GetNativeView()->SetName("BackgroundWidget");
- background_widget->Show();
-}
-
-BackgroundController::~BackgroundController() {
- // background_widget is owned by the container and will be deleted
- // when the container is deleted.
-}
-
-void BackgroundController::SetImage(const gfx::ImageSkia& image) {
- // TODO(oshima): implement cross fede animation.
- background_view_->SetImage(image);
-}
-
-} // namespace athena
« no previous file with comments | « athena/system/background_controller.h ('k') | athena/system/network_selector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698