summaryrefslogtreecommitdiffstats
path: root/ash/desktop_background
diff options
context:
space:
mode:
authorpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 13:28:21 +0000
committerpkotwicz@chromium.org <pkotwicz@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-05-31 13:28:21 +0000
commit2eb6b89474c70bf69590fe07ab57bd95ca407b69 (patch)
treed6742fb05829eae0800976fef4d668977ef25f02 /ash/desktop_background
parent7afa6f3a5c5a13fda9e96b65dee2c08071af0c05 (diff)
downloadchromium_src-2eb6b89474c70bf69590fe07ab57bd95ca407b69.zip
chromium_src-2eb6b89474c70bf69590fe07ab57bd95ca407b69.tar.gz
chromium_src-2eb6b89474c70bf69590fe07ab57bd95ca407b69.tar.bz2
Revert 139776 - Convert ash and chromeos parts of chrome/ to ImageSkia
Used same conversion script as 10437006 Changed by hand afterwards: 1 ash/shell/app_list.cc 2 ash/shell/content_client/shell_content_browser_client.h 3 ash/shell/window_watcher.cc 4 ash/system/tray/tray_views.h 5 ash/system/user/tray_user.cc 6 ash/test/test_launcher_delegate.cc 7 ash/wm/frame_painter.cc 8 ash/wm/image_grid_unittest.cc 9 chrome/browser/chrome_content_browser_client.cc 10 chrome/browser/chrome_content_browser_client.h 11 chrome/browser/chromeos/extensions/file_manager_util.cc 12 chrome/browser/chromeos/login/message_bubble.h 13 chrome/browser/chromeos/login/take_photo_view.cc 14 chrome/browser/chromeos/login/take_photo_view.h 15 chrome/browser/chromeos/login/user.h 16 chrome/browser/chromeos/login/user_image_screen.cc 17 chrome/browser/chromeos/login/user_image_screen_actor.h 18 chrome/browser/chromeos/login/webui_login_view.cc 19 chrome/browser/chromeos/options/take_photo_dialog.cc 20 chrome/browser/chromeos/status/data_promo_notification.cc 21 chrome/browser/chromeos/status/network_menu_icon.cc 22 chrome/browser/chromeos/status/network_menu_icon.h 23 chrome/browser/chromeos/status/network_menu_icon_unittest.cc 24 chrome/browser/debugger/devtools_window.cc 25 chrome/browser/favicon/favicon_handler.cc 26 chrome/browser/favicon/favicon_tab_helper.cc 27 chrome/browser/instant/instant_loader.cc 28 chrome/browser/ui/toolbar/back_forward_menu_model.cc 29 chrome/browser/ui/views/ash/browser_non_client_frame_view_ash.cc 30 chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.cc 31 chrome/browser/ui/webui/chromeos/login/user_image_screen_handler.h 32 chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.cc 33 chrome/browser/ui/webui/options2/chromeos/change_picture_options_handler2.h 34 chrome/browser/ui/webui/options2/chromeos/internet_options_handler2.h 35 chrome/browser/ui/webui/options2/chromeos/user_image_source2.cc 36 chrome/browser/ui/webui/options2/chromeos/wallpaper_thumbnail_source2.cc 37 content/browser/mock_content_browser_client.cc 38 content/browser/mock_content_browser_client.h 39 content/public/browser/content_browser_client.h 40 content/public/browser/favicon_status.cc 41 content/public/browser/favicon_status.h 42 content/shell/shell_content_browser_client.cc 43 content/shell/shell_content_browser_client.h 44 ui/views/examples/content_client/examples_content_browser_client.cc 45 ui/views/examples/content_client/examples_content_browser_client.h Fixed headers and spacing 1 ash/desktop_background/desktop_background_controller.cc 2 ash/desktop_background/desktop_background_controller.h 3 ash/desktop_background/desktop_background_resources.cc 4 ash/desktop_background/desktop_background_resources.h 5 ash/shell.h 6 ash/shell_factory.h 7 ash/system/tray/system_tray_delegate.h 8 ash/wm/frame_painter.h 9 chrome/browser/chromeos/login/default_user_images.h 10 chrome/browser/chromeos/status/network_menu.cc Test=Compiles Bug=124566 Review URL: https://chromiumcodereview.appspot.com/10443062 TBR=pkotwicz@chromium.org Review URL: https://chromiumcodereview.appspot.com/10456054 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@139778 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/desktop_background')
-rw-r--r--ash/desktop_background/desktop_background_controller.cc13
-rw-r--r--ash/desktop_background/desktop_background_controller.h7
-rw-r--r--ash/desktop_background/desktop_background_resources.cc1
-rw-r--r--ash/desktop_background/desktop_background_resources.h2
-rw-r--r--ash/desktop_background/desktop_background_view.cc5
-rw-r--r--ash/desktop_background/desktop_background_view.h6
6 files changed, 17 insertions, 17 deletions
diff --git a/ash/desktop_background/desktop_background_controller.cc b/ash/desktop_background/desktop_background_controller.cc
index a173098..5b2562e 100644
--- a/ash/desktop_background/desktop_background_controller.cc
+++ b/ash/desktop_background/desktop_background_controller.cc
@@ -42,7 +42,7 @@ class DesktopBackgroundController::WallpaperOperation
if (cancel_flag_.IsSet())
return;
wallpaper_ = ui::ResourceBundle::GetSharedInstance().GetImageNamed(
- GetWallpaperInfo(index_).id).ToImageSkia();
+ GetWallpaperInfo(index_).id).ToSkBitmap();
if (cancel_flag_.IsSet())
return;
layout_ = GetWallpaperInfo(index_).layout;
@@ -52,7 +52,7 @@ class DesktopBackgroundController::WallpaperOperation
cancel_flag_.Set();
}
- const gfx::ImageSkia* wallpaper() {
+ const SkBitmap* wallpaper() {
return wallpaper_;
}
@@ -70,7 +70,7 @@ class DesktopBackgroundController::WallpaperOperation
base::CancellationFlag cancel_flag_;
- const gfx::ImageSkia* wallpaper_;
+ const SkBitmap* wallpaper_;
WallpaperLayout layout_;
int index_;
@@ -103,9 +103,8 @@ void DesktopBackgroundController::SetDefaultWallpaper(int index) {
true /* task_is_slow */);
}
-void DesktopBackgroundController::SetCustomWallpaper(
- const gfx::ImageSkia& wallpaper,
- WallpaperLayout layout) {
+void DesktopBackgroundController::SetCustomWallpaper(const SkBitmap& wallpaper,
+ WallpaperLayout layout) {
internal::RootWindowLayoutManager* root_window_layout =
Shell::GetInstance()->root_window_layout();
root_window_layout->SetBackgroundLayer(NULL);
@@ -171,7 +170,7 @@ void DesktopBackgroundController::OnWallpaperLoadCompleted(
}
void DesktopBackgroundController::CreateEmptyWallpaper() {
- gfx::ImageSkia dummy;
+ SkBitmap dummy;
internal::CreateDesktopBackground(dummy, CENTER);
desktop_background_mode_ = BACKGROUND_IMAGE;
}
diff --git a/ash/desktop_background/desktop_background_controller.h b/ash/desktop_background/desktop_background_controller.h
index 0b80157..a531001 100644
--- a/ash/desktop_background/desktop_background_controller.h
+++ b/ash/desktop_background/desktop_background_controller.h
@@ -11,9 +11,7 @@
#include "base/basictypes.h"
#include "base/memory/weak_ptr.h"
-namespace gfx {
-class ImageSkia;
-}
+class SkBitmap;
namespace ash {
@@ -55,8 +53,7 @@ class ASH_EXPORT DesktopBackgroundController {
// Sets the user selected custom wallpaper. Called when user selected a file
// from file system or changed the layout of wallpaper.
- void SetCustomWallpaper(const gfx::ImageSkia& wallpaper,
- WallpaperLayout layout);
+ void SetCustomWallpaper(const SkBitmap& wallpaper, WallpaperLayout layout);
// Cancels the current wallpaper loading operation.
void CancelPendingWallpaperOperation();
diff --git a/ash/desktop_background/desktop_background_resources.cc b/ash/desktop_background/desktop_background_resources.cc
index 76dc091..e5cf675 100644
--- a/ash/desktop_background/desktop_background_resources.cc
+++ b/ash/desktop_background/desktop_background_resources.cc
@@ -9,6 +9,7 @@
#include "grit/ui_resources.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/image/image.h"
+#include "third_party/skia/include/core/SkBitmap.h"
namespace {
diff --git a/ash/desktop_background/desktop_background_resources.h b/ash/desktop_background/desktop_background_resources.h
index 1de8762..4b48e9d 100644
--- a/ash/desktop_background/desktop_background_resources.h
+++ b/ash/desktop_background/desktop_background_resources.h
@@ -7,6 +7,8 @@
#include "ash/ash_export.h"
+class SkBitmap;
+
namespace ash {
enum WallpaperLayout {
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index bedd737..c1c08d8 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -60,10 +60,11 @@ static int RoundPositive(double x) {
////////////////////////////////////////////////////////////////////////////////
// DesktopBackgroundView, public:
-DesktopBackgroundView::DesktopBackgroundView(const gfx::ImageSkia& wallpaper,
+DesktopBackgroundView::DesktopBackgroundView(const SkBitmap& wallpaper,
WallpaperLayout wallpaper_layout) {
wallpaper_ = wallpaper;
wallpaper_layout_ = wallpaper_layout;
+ wallpaper_.buildMipMap(false);
}
DesktopBackgroundView::~DesktopBackgroundView() {
@@ -126,7 +127,7 @@ void DesktopBackgroundView::OnMouseReleased(const views::MouseEvent& event) {
Shell::GetInstance()->ShowBackgroundMenu(GetWidget(), event.location());
}
-void CreateDesktopBackground(const gfx::ImageSkia& wallpaper,
+void CreateDesktopBackground(const SkBitmap& wallpaper,
WallpaperLayout wallpaper_layout) {
views::Widget* desktop_widget = new views::Widget;
views::Widget::InitParams params(
diff --git a/ash/desktop_background/desktop_background_view.h b/ash/desktop_background/desktop_background_view.h
index 16164e4..4a5b676 100644
--- a/ash/desktop_background/desktop_background_view.h
+++ b/ash/desktop_background/desktop_background_view.h
@@ -7,7 +7,7 @@
#pragma once
#include "ash/desktop_background/desktop_background_resources.h"
-#include "ui/gfx/image/image_skia.h"
+#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget_delegate.h"
@@ -16,7 +16,7 @@ namespace internal {
class DesktopBackgroundView : public views::WidgetDelegateView {
public:
- DesktopBackgroundView(const gfx::ImageSkia& wallpaper,
+ DesktopBackgroundView(const SkBitmap& wallpaper,
WallpaperLayout wallpaper_layout);
virtual ~DesktopBackgroundView();
@@ -26,7 +26,7 @@ class DesktopBackgroundView : public views::WidgetDelegateView {
virtual bool OnMousePressed(const views::MouseEvent& event) OVERRIDE;
virtual void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
- gfx::ImageSkia wallpaper_;
+ SkBitmap wallpaper_;
WallpaperLayout wallpaper_layout_;
DISALLOW_COPY_AND_ASSIGN(DesktopBackgroundView);