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

Side by Side Diff: ash/system/user/user_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase to ToT Created 6 years, 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/system/user/user_view.h" 5 #include "ash/system/user/user_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/multi_profile_uma.h" 9 #include "ash/multi_profile_uma.h"
10 #include "ash/popup_message.h" 10 #include "ash/popup_message.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 public: 130 public:
131 // The |owner| is the view for which this view gets created. 131 // The |owner| is the view for which this view gets created.
132 AddUserView(ButtonFromView* owner); 132 AddUserView(ButtonFromView* owner);
133 virtual ~AddUserView(); 133 virtual ~AddUserView();
134 134
135 // Get the anchor view for a message. 135 // Get the anchor view for a message.
136 views::View* anchor() { return anchor_; } 136 views::View* anchor() { return anchor_; }
137 137
138 private: 138 private:
139 // Overridden from views::View. 139 // Overridden from views::View.
140 virtual gfx::Size GetPreferredSize() OVERRIDE; 140 virtual gfx::Size GetPreferredSize() const OVERRIDE;
141 141
142 // Create the additional client content for this item. 142 // Create the additional client content for this item.
143 void AddContent(); 143 void AddContent();
144 144
145 // This is the content we create and show. 145 // This is the content we create and show.
146 views::View* add_user_; 146 views::View* add_user_;
147 147
148 // This is the owner view of this item. 148 // This is the owner view of this item.
149 ButtonFromView* owner_; 149 ButtonFromView* owner_;
150 150
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 // watcher which will close the "menu". 483 // watcher which will close the "menu".
484 gfx::Rect area = user_card_view_->GetBoundsInScreen(); 484 gfx::Rect area = user_card_view_->GetBoundsInScreen();
485 area.set_height(2 * area.height()); 485 area.set_height(2 * area.height());
486 mouse_watcher_.reset( 486 mouse_watcher_.reset(
487 new views::MouseWatcher(new UserViewMouseWatcherHost(area), this)); 487 new views::MouseWatcher(new UserViewMouseWatcherHost(area), this));
488 mouse_watcher_->Start(); 488 mouse_watcher_->Start();
489 } 489 }
490 490
491 } // namespace tray 491 } // namespace tray
492 } // namespace ash 492 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698