summaryrefslogtreecommitdiffstats
path: root/ash/system/tray
diff options
context:
space:
mode:
authorkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 06:58:55 +0000
committerkuan@chromium.org <kuan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 06:58:55 +0000
commit8045d3c8fae9ecae0575a2c6c60c4193712e8953 (patch)
tree880adbe053e894d143572211ca13b277e20b318c /ash/system/tray
parent8d2e3c4657585b908756750672b3889e7434b99e (diff)
downloadchromium_src-8045d3c8fae9ecae0575a2c6c60c4193712e8953.zip
chromium_src-8045d3c8fae9ecae0575a2c6c60c4193712e8953.tar.gz
chromium_src-8045d3c8fae9ecae0575a2c6c60c4193712e8953.tar.bz2
modify View::ViewHierarchyChanged signature
- move pararms to a new struct, add a new |move_view| which is used when a view is moved from one parent to another - this allows NativeViewHost to not remove a reparented view from its widget if its previous and new parents belong to the same widget; this saves resources, and stops spurious webkitvisibilitychange events. - restructured test code and added test BUG=236826 TEST=all tests still pass. TBR=jochen (for content/shell/shell_aura.cc, simple change for ViewHierarchyChanged signature) Review URL: https://chromiumcodereview.appspot.com/14999006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/system/tray')
-rw-r--r--ash/system/tray/tray_background_view.cc7
-rw-r--r--ash/system/tray/tray_background_view.h5
2 files changed, 5 insertions, 7 deletions
diff --git a/ash/system/tray/tray_background_view.cc b/ash/system/tray/tray_background_view.cc
index 3f51d62a..1352ecd 100644
--- a/ash/system/tray/tray_background_view.cc
+++ b/ash/system/tray/tray_background_view.cc
@@ -128,10 +128,9 @@ void TrayBackgroundView::TrayContainer::ChildVisibilityChanged(View* child) {
PreferredSizeChanged();
}
-void TrayBackgroundView::TrayContainer::ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) {
- if (parent == this)
+void TrayBackgroundView::TrayContainer::ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) {
+ if (details.parent == this)
PreferredSizeChanged();
}
diff --git a/ash/system/tray/tray_background_view.h b/ash/system/tray/tray_background_view.h
index 15597ba..a5f8597 100644
--- a/ash/system/tray/tray_background_view.h
+++ b/ash/system/tray/tray_background_view.h
@@ -44,9 +44,8 @@ class ASH_EXPORT TrayBackgroundView : public ActionableView,
// Overridden from views::View.
virtual void ChildPreferredSizeChanged(views::View* child) OVERRIDE;
virtual void ChildVisibilityChanged(View* child) OVERRIDE;
- virtual void ViewHierarchyChanged(bool is_add,
- View* parent,
- View* child) OVERRIDE;
+ virtual void ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) OVERRIDE;
private:
void UpdateLayout();