summaryrefslogtreecommitdiffstats
path: root/ash
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
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')
-rw-r--r--ash/shell/lock_view.cc7
-rw-r--r--ash/system/tray/tray_background_view.cc7
-rw-r--r--ash/system/tray/tray_background_view.h5
3 files changed, 8 insertions, 11 deletions
diff --git a/ash/shell/lock_view.cc b/ash/shell/lock_view.cc
index 95691b0..5663032 100644
--- a/ash/shell/lock_view.cc
+++ b/ash/shell/lock_view.cc
@@ -55,10 +55,9 @@ class LockView : public views::WidgetDelegateView,
bounds.set_size(ps);
unlock_button_->SetBoundsRect(bounds);
}
- virtual void ViewHierarchyChanged(bool is_add,
- views::View* parent,
- views::View* child) OVERRIDE {
- if (is_add && child == this)
+ virtual void ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) OVERRIDE {
+ if (details.is_add && details.child == this)
unlock_button_->RequestFocus();
}
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();