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

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

Issue 53120: Review Request: fix issue 5724, 5738 -- wrong position of system menu (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 8 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 | « no previous file | chrome/views/window/custom_frame_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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/frame/opaque_browser_frame_view.h" 5 #include "chrome/browser/views/frame/opaque_browser_frame_view.h"
6 6
7 #include "chrome/browser/views/frame/browser_frame.h" 7 #include "chrome/browser/views/frame/browser_frame.h"
8 #include "chrome/browser/views/frame/browser_view.h" 8 #include "chrome/browser/views/frame/browser_view.h"
9 #include "chrome/browser/views/tabs/tab_strip.h" 9 #include "chrome/browser/views/tabs/tab_strip.h"
10 #include "chrome/common/gfx/chrome_canvas.h" 10 #include "chrome/common/gfx/chrome_canvas.h"
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 const gfx::Rect& client_bounds) const { 453 const gfx::Rect& client_bounds) const {
454 int top_height = NonClientTopBorderHeight(); 454 int top_height = NonClientTopBorderHeight();
455 int border_thickness = NonClientBorderThickness(); 455 int border_thickness = NonClientBorderThickness();
456 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness), 456 return gfx::Rect(std::max(0, client_bounds.x() - border_thickness),
457 std::max(0, client_bounds.y() - top_height), 457 std::max(0, client_bounds.y() - top_height),
458 client_bounds.width() + (2 * border_thickness), 458 client_bounds.width() + (2 * border_thickness),
459 client_bounds.height() + top_height + border_thickness); 459 client_bounds.height() + top_height + border_thickness);
460 } 460 }
461 461
462 gfx::Point OpaqueBrowserFrameView::GetSystemMenuPoint() const { 462 gfx::Point OpaqueBrowserFrameView::GetSystemMenuPoint() const {
463 gfx::Point system_menu_point(FrameBorderThickness(), 463 gfx::Point system_menu_point(
464 MirroredXCoordinateInsideView(FrameBorderThickness()),
464 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() - 465 NonClientTopBorderHeight() + browser_view_->GetTabStripHeight() -
465 (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness)); 466 (browser_view_->IsFullscreen() ? 0 : kClientEdgeThickness));
466 ConvertPointToScreen(this, &system_menu_point); 467 ConvertPointToScreen(this, &system_menu_point);
467 return system_menu_point; 468 return system_menu_point;
468 } 469 }
469 470
470 int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { 471 int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
471 if (!bounds().Contains(point)) 472 if (!bounds().Contains(point))
472 return HTNOWHERE; 473 return HTNOWHERE;
473 474
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 } 1053 }
1053 1054
1054 // static 1055 // static
1055 void OpaqueBrowserFrameView::InitAppWindowResources() { 1056 void OpaqueBrowserFrameView::InitAppWindowResources() {
1056 static bool initialized = false; 1057 static bool initialized = false;
1057 if (!initialized) { 1058 if (!initialized) {
1058 title_font_ = win_util::GetWindowTitleFont(); 1059 title_font_ = win_util::GetWindowTitleFont();
1059 initialized = true; 1060 initialized = true;
1060 } 1061 }
1061 } 1062 }
OLDNEW
« no previous file with comments | « no previous file | chrome/views/window/custom_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698