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

Unified Diff: ash/common/system/user/user_view.h

Issue 2732813002: chromeos: Move files in //ash/common to //ash, part 1 (Closed)
Patch Set: rebase Created 3 years, 10 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 | « ash/common/system/user/user_observer.h ('k') | ash/common/system/user/user_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/common/system/user/user_view.h
diff --git a/ash/common/system/user/user_view.h b/ash/common/system/user/user_view.h
deleted file mode 100644
index 56d4fb342fce17688bf639d81af2072801cff5d1..0000000000000000000000000000000000000000
--- a/ash/common/system/user/user_view.h
+++ /dev/null
@@ -1,96 +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.
-
-#ifndef ASH_COMMON_SYSTEM_USER_USER_VIEW_H_
-#define ASH_COMMON_SYSTEM_USER_USER_VIEW_H_
-
-#include <memory>
-
-#include "ash/common/system/tray/tray_constants.h"
-#include "ash/common/system/user/tray_user.h"
-#include "ash/public/cpp/session_types.h"
-#include "base/macros.h"
-#include "ui/views/controls/button/button.h"
-#include "ui/views/focus/focus_manager.h"
-#include "ui/views/layout/box_layout.h"
-#include "ui/views/view.h"
-
-namespace gfx {
-class Rect;
-}
-
-namespace views {
-class FocusManager;
-}
-
-namespace ash {
-
-enum class LoginStatus;
-class SystemTrayItem;
-
-namespace tray {
-
-// The view of a user item in system tray bubble.
-class UserView : public views::View,
- public views::ButtonListener,
- public views::FocusChangeListener {
- public:
- UserView(SystemTrayItem* owner, LoginStatus login, UserIndex index);
- ~UserView() override;
-
- TrayUser::TestState GetStateForTest() const;
- gfx::Rect GetBoundsInScreenOfUserButtonForTest();
-
- views::View* user_card_view_for_test() const { return user_card_view_; }
-
- private:
- // Retruns true if |this| view is for the currently active user, i.e. top row.
- bool IsActiveUser() const;
-
- // Overridden from views::View.
- int GetHeightForWidth(int width) const override;
-
- // Overridden from views::ButtonListener.
- void ButtonPressed(views::Button* sender, const ui::Event& event) override;
-
- // Overridden from views::FocusChangeListener:
- void OnWillChangeFocus(View* focused_before, View* focused_now) override;
- void OnDidChangeFocus(View* focused_before, View* focused_now) override;
-
- void AddLogoutButton(LoginStatus login);
- void AddUserCard(LoginStatus login);
-
- // Create the menu option to add another user. If |disabled| is set the user
- // cannot actively click on the item.
- void ToggleAddUserMenuOption();
-
- // Removes the add user menu option.
- void RemoveAddUserMenuOption();
-
- const UserIndex user_index_;
- views::View* user_card_view_;
-
- // This is the owner system tray item of this view.
- SystemTrayItem* owner_;
-
- // True if |user_card_view_| is a |ButtonFromView| - otherwise it is only
- // a |UserCardView|.
- bool is_user_card_button_;
-
- views::View* logout_button_;
- std::unique_ptr<views::Widget> add_menu_option_;
-
- // False when the add user panel is visible but not activatable.
- bool add_user_enabled_;
-
- // The focus manager which we use to detect focus changes.
- views::FocusManager* focus_manager_;
-
- DISALLOW_COPY_AND_ASSIGN(UserView);
-};
-
-} // namespace tray
-} // namespace ash
-
-#endif // ASH_COMMON_SYSTEM_USER_USER_VIEW_H_
« no previous file with comments | « ash/common/system/user/user_observer.h ('k') | ash/common/system/user/user_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698