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

Side by Side Diff: ash/launcher/launcher_button.cc

Issue 9703026: Makes the maximize/restore button handling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Incorporate review feedback Created 8 years, 9 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
« no previous file with comments | « ash/launcher/launcher_button.h ('k') | ash/launcher/launcher_delegate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/launcher/launcher_button.h" 5 #include "ash/launcher/launcher_button.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ash/launcher/launcher_button_host.h" 9 #include "ash/launcher/launcher_button_host.h"
10 #include "ui/base/accessibility/accessible_view_state.h" 10 #include "ui/base/accessibility/accessible_view_state.h"
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 base::TimeDelta::FromMilliseconds(kHopDownMS)); 133 base::TimeDelta::FromMilliseconds(kHopDownMS));
134 state_ &= ~state; 134 state_ &= ~state;
135 UpdateState(); 135 UpdateState();
136 } else { 136 } else {
137 state_ &= ~state; 137 state_ &= ~state;
138 UpdateState(); 138 UpdateState();
139 } 139 }
140 } 140 }
141 } 141 }
142 142
143 gfx::Rect LauncherButton::GetIconBounds() const {
144 return icon_view_->bounds();
145 }
146
143 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) { 147 bool LauncherButton::OnMousePressed(const views::MouseEvent& event) {
144 CustomButton::OnMousePressed(event); 148 CustomButton::OnMousePressed(event);
145 host_->MousePressedOnButton(this, event); 149 host_->MousePressedOnButton(this, event);
146 return true; 150 return true;
147 } 151 }
148 152
149 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) { 153 void LauncherButton::OnMouseReleased(const views::MouseEvent& event) {
150 host_->MouseReleasedOnButton(this, false); 154 host_->MouseReleasedOnButton(this, false);
151 CustomButton::OnMouseReleased(event); 155 CustomButton::OnMouseReleased(event);
152 } 156 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 bar_->set_background(views::Background::CreateSolidBackground( 227 bar_->set_background(views::Background::CreateSolidBackground(
224 kInactiveBarColor)); 228 kInactiveBarColor));
225 } 229 }
226 } 230 }
227 231
228 Layout(); 232 Layout();
229 SchedulePaint(); 233 SchedulePaint();
230 } 234 }
231 } // namespace internal 235 } // namespace internal
232 } // namespace ash 236 } // namespace ash
OLDNEW
« no previous file with comments | « ash/launcher/launcher_button.h ('k') | ash/launcher/launcher_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698