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

Side by Side Diff: chrome/browser/views/dropdown_bar_host.cc

Issue 3167027: Merge 56737 - Fix numerous alignment problems, both horizontal and vertical, ... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/472/src/
Patch Set: Created 10 years, 4 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 | « chrome/browser/views/dropdown_bar_host.h ('k') | chrome/browser/views/find_bar_view.cc » ('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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "chrome/browser/views/dropdown_bar_host.h" 5 #include "chrome/browser/views/dropdown_bar_host.h"
6 6
7 #include "app/slide_animation.h" 7 #include "app/slide_animation.h"
8 #include "base/keyboard_codes.h" 8 #include "base/keyboard_codes.h"
9 #include "base/scoped_handle.h" 9 #include "base/scoped_handle.h"
10 #include "chrome/browser/browser.h" 10 #include "chrome/browser/browser.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 167
168 if (!animation_->IsShowing()) { 168 if (!animation_->IsShowing()) {
169 // Animation has finished closing. 169 // Animation has finished closing.
170 host_->Hide(); 170 host_->Hide();
171 is_visible_ = false; 171 is_visible_ = false;
172 } else { 172 } else {
173 // Animation has finished opening. 173 // Animation has finished opening.
174 } 174 }
175 } 175 }
176 176
177 void DropdownBarHost::GetThemePosition(gfx::Rect* bounds) {
178 *bounds = GetDialogPosition(gfx::Rect());
179 gfx::Rect toolbar_bounds = browser_view_->GetToolbarBounds();
180 gfx::Rect tab_strip_bounds = browser_view_->GetTabStripBounds();
181 bounds->Offset(-toolbar_bounds.x(), -tab_strip_bounds.y());
182 }
183
184 //////////////////////////////////////////////////////////////////////////////// 177 ////////////////////////////////////////////////////////////////////////////////
185 // DropdownBarHost protected: 178 // DropdownBarHost protected:
186 179
187 void DropdownBarHost::ResetFocusTracker() { 180 void DropdownBarHost::ResetFocusTracker() {
188 focus_tracker_.reset(NULL); 181 focus_tracker_.reset(NULL);
189 } 182 }
190 183
191 void DropdownBarHost::GetWidgetBounds(gfx::Rect* bounds) { 184 void DropdownBarHost::GetWidgetBounds(gfx::Rect* bounds) {
192 DCHECK(bounds); 185 DCHECK(bounds);
193 *bounds = browser_view_->bounds(); 186 *bounds = browser_view_->bounds();
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 focus_manager_->RegisterAccelerator(escape, this); 301 focus_manager_->RegisterAccelerator(escape, this);
309 esc_accel_target_registered_ = true; 302 esc_accel_target_registered_ = true;
310 } 303 }
311 304
312 void DropdownBarHost::UnregisterAccelerators() { 305 void DropdownBarHost::UnregisterAccelerators() {
313 DCHECK(esc_accel_target_registered_); 306 DCHECK(esc_accel_target_registered_);
314 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false); 307 views::Accelerator escape(base::VKEY_ESCAPE, false, false, false);
315 focus_manager_->UnregisterAccelerator(escape, this); 308 focus_manager_->UnregisterAccelerator(escape, this);
316 esc_accel_target_registered_ = false; 309 esc_accel_target_registered_ = false;
317 } 310 }
OLDNEW
« no previous file with comments | « chrome/browser/views/dropdown_bar_host.h ('k') | chrome/browser/views/find_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698