diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-15 16:28:51 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-15 16:28:51 +0000 |
commit | 74db479680863c2094c44825b8b28ad7572e4e60 (patch) | |
tree | 1b99fccd35f05406b35a45d6caa512d5ee5b286f /views/view.cc | |
parent | daaaef4c3fa2cf8ccc6e49cb40c359c10ae79c9b (diff) | |
download | chromium_src-74db479680863c2094c44825b8b28ad7572e4e60.zip chromium_src-74db479680863c2094c44825b8b28ad7572e4e60.tar.gz chromium_src-74db479680863c2094c44825b8b28ad7572e4e60.tar.bz2 |
Revert 49795 - Changes the tab close button to a dot, unless you're near the button
or the tab is selected.
I'm not to keen on the mouse near names, if you have better ideas
please say so.
BUG=45743
TEST=none
Review URL: http://codereview.chromium.org/2796006
TBR=sky@chromium.org
Review URL: http://codereview.chromium.org/2823005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.cc')
-rw-r--r-- | views/view.cc | 33 |
1 files changed, 8 insertions, 25 deletions
diff --git a/views/view.cc b/views/view.cc index 988e76b..012240a 100644 --- a/views/view.cc +++ b/views/view.cc @@ -132,21 +132,6 @@ void View::SetBounds(const gfx::Rect& bounds) { } } -void View::RegisterForMouseNearEvents(const gfx::Insets& insets) { - RootView* root = GetRootView(); - if (insets.empty()) { - near_insets_.reset(NULL); - if (root) - root->UnregisterViewForNearNotification(this); - } else { - near_insets_.reset( - new gfx::Insets(insets.top(), insets.left(), insets.bottom(), - insets.right())); - if (root) - root->RegisterViewForNearNotification(this); - } -} - gfx::Rect View::GetLocalBounds(bool include_border) const { if (include_border || !border_.get()) return gfx::Rect(0, 0, width(), height()); @@ -552,7 +537,7 @@ void View::AddChildView(int index, View* v) { UpdateTooltip(); RootView* root = GetRootView(); if (root) - RegisterChildrenForRootNotifications(root, v); + RegisterChildrenForVisibleBoundsNotification(root, v); if (layout_manager_.get()) layout_manager_->ViewAdded(this, v); @@ -624,7 +609,7 @@ void View::DoRemoveChildView(View* a_view, RootView* root = GetRootView(); if (root) - UnregisterChildrenForRootNotifications(root, a_view); + UnregisterChildrenForVisibleBoundsNotification(root, a_view); a_view->PropagateRemoveNotifications(this); a_view->SetParent(NULL); @@ -1455,26 +1440,24 @@ ThemeProvider* View::GetThemeProvider() const { } // static -void View::RegisterChildrenForRootNotifications(RootView* root, View* view) { +void View::RegisterChildrenForVisibleBoundsNotification( + RootView* root, View* view) { DCHECK(root && view); if (view->GetNotifyWhenVisibleBoundsInRootChanges()) root->RegisterViewForVisibleBoundsNotification(view); - if (view->near_insets_.get()) - root->RegisterViewForNearNotification(view); for (int i = 0; i < view->GetChildViewCount(); ++i) - RegisterChildrenForRootNotifications(root, view->GetChildViewAt(i)); + RegisterChildrenForVisibleBoundsNotification(root, view->GetChildViewAt(i)); } // static -void View::UnregisterChildrenForRootNotifications( +void View::UnregisterChildrenForVisibleBoundsNotification( RootView* root, View* view) { DCHECK(root && view); if (view->GetNotifyWhenVisibleBoundsInRootChanges()) root->UnregisterViewForVisibleBoundsNotification(view); - if (view->near_insets_.get()) - root->UnregisterViewForNearNotification(view); for (int i = 0; i < view->GetChildViewCount(); ++i) - UnregisterChildrenForRootNotifications(root, view->GetChildViewAt(i)); + UnregisterChildrenForVisibleBoundsNotification(root, + view->GetChildViewAt(i)); } void View::AddDescendantToNotify(View* view) { |