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

Unified Diff: chrome/browser/signin/screenlock_bridge.cc

Issue 562393002: Remove unused chrome.screenlockPrivate methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 | « chrome/browser/signin/screenlock_bridge.h ('k') | chrome/common/extensions/api/screenlock_private.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/screenlock_bridge.cc
diff --git a/chrome/browser/signin/screenlock_bridge.cc b/chrome/browser/signin/screenlock_bridge.cc
index 4a95429aa295852af17d789c0658b637de3a4177..0f9ebb46cebedd04b6b6a693d9da0b35d4c8b607 100644
--- a/chrome/browser/signin/screenlock_bridge.cc
+++ b/chrome/browser/signin/screenlock_bridge.cc
@@ -9,9 +9,6 @@
#include "chrome/browser/profiles/profile_window.h"
#include "chrome/browser/signin/signin_manager_factory.h"
#include "components/signin/core/browser/signin_manager.h"
-#include "ui/base/webui/web_ui_util.h"
-#include "ui/gfx/image/image.h"
-#include "ui/gfx/image/image_skia.h"
#if defined(OS_CHROMEOS)
#include "chromeos/dbus/dbus_thread_manager.h"
@@ -46,24 +43,10 @@ ScreenlockBridge::UserPodCustomIconOptions::~UserPodCustomIconOptions() {}
scoped_ptr<base::DictionaryValue>
ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
scoped_ptr<base::DictionaryValue> result(new base::DictionaryValue());
- if (!icon_image_ && icon_resource_url_.empty())
+ if (icon_resource_url_.empty())
return result.Pass();
- if (icon_image_) {
- gfx::ImageSkia icon_skia = icon_image_->AsImageSkia();
- base::DictionaryValue* icon_representations = new base::DictionaryValue();
- icon_representations->SetString(
- "scale1x",
- webui::GetBitmapDataUrl(
- icon_skia.GetRepresentation(1.0f).sk_bitmap()));
- icon_representations->SetString(
- "scale2x",
- webui::GetBitmapDataUrl(
- icon_skia.GetRepresentation(2.0f).sk_bitmap()));
- result->Set("data", icon_representations);
- } else {
- result->SetString("resourceUrl", icon_resource_url_);
- }
+ result->SetString("resourceUrl", icon_resource_url_);
if (!tooltip_.empty()) {
base::DictionaryValue* tooltip_options = new base::DictionaryValue();
@@ -96,18 +79,9 @@ ScreenlockBridge::UserPodCustomIconOptions::ToDictionaryValue() const {
void ScreenlockBridge::UserPodCustomIconOptions::SetIconAsResourceURL(
const std::string& url) {
- DCHECK(!icon_image_);
-
icon_resource_url_ = url;
}
-void ScreenlockBridge::UserPodCustomIconOptions::SetIconAsImage(
- const gfx::Image& image) {
- DCHECK(icon_resource_url_.empty());
-
- icon_image_.reset(new gfx::Image(image));
- SetSize(image.Width(), image.Height());
-}
void ScreenlockBridge::UserPodCustomIconOptions::SetSize(size_t icon_width,
size_t icon_height) {
« no previous file with comments | « chrome/browser/signin/screenlock_bridge.h ('k') | chrome/common/extensions/api/screenlock_private.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698