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

Side by Side Diff: chrome/browser/ui/views/frame/opaque_browser_frame_view.cc

Issue 6452011: Rework tree APIs to reflect Google style and more const-correctness.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ui/views/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/opaque_browser_frame_view.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/tab_contents/tab_contents.h" 9 #include "chrome/browser/tab_contents/tab_contents.h"
10 #include "chrome/browser/themes/browser_theme_provider.h" 10 #include "chrome/browser/themes/browser_theme_provider.h"
(...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 tabstrip_bounds.set_origin(tabstrip_origin); 388 tabstrip_bounds.set_origin(tabstrip_origin);
389 if ((!vertical_tabs && l.y() > tabstrip_bounds.bottom()) || 389 if ((!vertical_tabs && l.y() > tabstrip_bounds.bottom()) ||
390 (vertical_tabs && l.x() > tabstrip_bounds.right())) { 390 (vertical_tabs && l.x() > tabstrip_bounds.right())) {
391 return false; 391 return false;
392 } 392 }
393 393
394 // We convert from our parent's coordinates since we assume we fill its bounds 394 // We convert from our parent's coordinates since we assume we fill its bounds
395 // completely. We need to do this since we're not a parent of the tabstrip, 395 // completely. We need to do this since we're not a parent of the tabstrip,
396 // meaning ConvertPointToView would otherwise return something bogus. 396 // meaning ConvertPointToView would otherwise return something bogus.
397 gfx::Point browser_view_point(l); 397 gfx::Point browser_view_point(l);
398 View::ConvertPointToView(GetParent(), browser_view_, &browser_view_point); 398 View::ConvertPointToView(parent(), browser_view_, &browser_view_point);
399 return browser_view_->IsPositionInWindowCaption(browser_view_point); 399 return browser_view_->IsPositionInWindowCaption(browser_view_point);
400 } 400 }
401 401
402 AccessibilityTypes::Role OpaqueBrowserFrameView::GetAccessibleRole() { 402 AccessibilityTypes::Role OpaqueBrowserFrameView::GetAccessibleRole() {
403 return AccessibilityTypes::ROLE_TITLEBAR; 403 return AccessibilityTypes::ROLE_TITLEBAR;
404 } 404 }
405 405
406 /////////////////////////////////////////////////////////////////////////////// 406 ///////////////////////////////////////////////////////////////////////////////
407 // OpaqueBrowserFrameView, views::ButtonListener implementation: 407 // OpaqueBrowserFrameView, views::ButtonListener implementation:
408 408
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
1060 1060
1061 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width, 1061 gfx::Rect OpaqueBrowserFrameView::CalculateClientAreaBounds(int width,
1062 int height) const { 1062 int height) const {
1063 int top_height = NonClientTopBorderHeight(false, false); 1063 int top_height = NonClientTopBorderHeight(false, false);
1064 int border_thickness = NonClientBorderThickness(); 1064 int border_thickness = NonClientBorderThickness();
1065 return gfx::Rect(border_thickness, top_height, 1065 return gfx::Rect(border_thickness, top_height,
1066 std::max(0, width - (2 * border_thickness)), 1066 std::max(0, width - (2 * border_thickness)),
1067 std::max(0, height - GetReservedHeight() - 1067 std::max(0, height - GetReservedHeight() -
1068 top_height - border_thickness)); 1068 top_height - border_thickness));
1069 } 1069 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view_layout.cc ('k') | chrome/browser/ui/views/info_bubble.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698