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

Unified Diff: chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h

Issue 1575543003: Settings People Revamp: Implement parts of ChromeOS Change Picture (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix camera presence observer Created 4 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
Index: chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h
diff --git a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h
similarity index 74%
copy from chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
copy to chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h
index a7814e96054cd734dc2b281e338112d85570820a..6b3fbdf8ebb5d3c298a4194cdbc6f4de8638333d 100644
--- a/chrome/browser/ui/webui/options/chromeos/change_picture_options_handler.h
+++ b/chrome/browser/ui/webui/settings/chromeos/change_picture_handler.h
@@ -1,14 +1,15 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2015 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.
-#ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CHANGE_PICTURE_OPTIONS_HANDLER_H_
-#define CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CHANGE_PICTURE_OPTIONS_HANDLER_H_
+#ifndef CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_
+#define CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_
#include "base/macros.h"
+#include "base/scoped_observer.h"
#include "chrome/browser/chromeos/camera_presence_notifier.h"
#include "chrome/browser/image_decoder.h"
-#include "chrome/browser/ui/webui/options/options_ui.h"
+#include "chrome/browser/ui/webui/settings/md_settings_ui.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/image/image_skia.h"
@@ -26,20 +27,17 @@ class User;
namespace chromeos {
-namespace options {
+namespace settings {
-// ChromeOS user image options page UI handler.
-class ChangePictureOptionsHandler : public ::options::OptionsPageUIHandler,
- public ui::SelectFileDialog::Listener,
- public content::NotificationObserver,
- public ImageDecoder::ImageRequest,
- public CameraPresenceNotifier::Observer {
+// ChromeOS user image settings page UI handler.
+class ChangePictureHandler : public ::settings::SettingsPageUIHandler,
+ public ui::SelectFileDialog::Listener,
+ public content::NotificationObserver,
+ public ImageDecoder::ImageRequest,
+ public CameraPresenceNotifier::Observer {
public:
- ChangePictureOptionsHandler();
- ~ChangePictureOptionsHandler() override;
-
- // OptionsPageUIHandler implementation.
- void GetLocalizedValues(base::DictionaryValue* localized_strings) override;
+ ChangePictureHandler();
+ ~ChangePictureHandler() override;
// WebUIMessageHandler implementation.
void RegisterMessages() override;
@@ -89,12 +87,6 @@ class ChangePictureOptionsHandler : public ::options::OptionsPageUIHandler,
// Handles page initialized event.
void HandlePageInitialized(const base::ListValue* args);
- // Handles page shown event.
- void HandlePageShown(const base::ListValue* args);
-
- // Handles page hidden event.
- void HandlePageHidden(const base::ListValue* args);
-
// Selects one of the available images as user's.
void HandleSelectImage(const base::ListValue* args);
@@ -139,10 +131,12 @@ class ChangePictureOptionsHandler : public ::options::OptionsPageUIHandler,
content::NotificationRegistrar registrar_;
- DISALLOW_COPY_AND_ASSIGN(ChangePictureOptionsHandler);
+ ScopedObserver<CameraPresenceNotifier, ChangePictureHandler> camera_observer_;
+
+ DISALLOW_COPY_AND_ASSIGN(ChangePictureHandler);
};
-} // namespace options
+} // namespace settings
} // namespace chromeos
-#endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_CHROMEOS_CHANGE_PICTURE_OPTIONS_HANDLER_H_
+#endif // CHROME_BROWSER_UI_WEBUI_SETTINGS_CHROMEOS_CHANGE_PICTURE_HANDLER_H_

Powered by Google App Engine
This is Rietveld 408576698