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

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

Issue 2841: A couple of tweaks to the AeroGlassNonClientView:... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 3 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 | no next file » | 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/aero_glass_non_client_view.h" 5 #include "chrome/browser/views/frame/aero_glass_non_client_view.h"
6 6
7 #include "chrome/app/theme/theme_resources.h" 7 #include "chrome/app/theme/theme_resources.h"
8 #include "chrome/browser/tabs/tab_strip.h" 8 #include "chrome/browser/tabs/tab_strip.h"
9 #include "chrome/browser/views/frame/browser_view2.h" 9 #include "chrome/browser/views/frame/browser_view2.h"
10 #include "chrome/browser/views/window_resources.h" 10 #include "chrome/browser/views/window_resources.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 browser_view_(browser_view) { 128 browser_view_(browser_view) {
129 InitClass(); 129 InitClass();
130 } 130 }
131 131
132 AeroGlassNonClientView::~AeroGlassNonClientView() { 132 AeroGlassNonClientView::~AeroGlassNonClientView() {
133 } 133 }
134 134
135 gfx::Rect AeroGlassNonClientView::GetBoundsForTabStrip(TabStrip* tabstrip) { 135 gfx::Rect AeroGlassNonClientView::GetBoundsForTabStrip(TabStrip* tabstrip) {
136 // If we are maximized, the tab strip will be in line with the window 136 // If we are maximized, the tab strip will be in line with the window
137 // controls, so we need to make sure they don't overlap. 137 // controls, so we need to make sure they don't overlap.
138 int tabstrip_width = GetWidth(); 138 int tabstrip_width = browser_view_->GetWidth();
139 if(frame_->IsMaximized()) { 139 if(frame_->IsMaximized()) {
140 TITLEBARINFOEX titlebar_info; 140 TITLEBARINFOEX titlebar_info;
141 titlebar_info.cbSize = sizeof(TITLEBARINFOEX); 141 titlebar_info.cbSize = sizeof(TITLEBARINFOEX);
142 SendMessage(frame_->GetHWND(), WM_GETTITLEBARINFOEX, 0, 142 SendMessage(frame_->GetHWND(), WM_GETTITLEBARINFOEX, 0,
143 reinterpret_cast<WPARAM>(&titlebar_info)); 143 reinterpret_cast<WPARAM>(&titlebar_info));
144 144
145 // rgrect[2] refers to the minimize button. 145 // rgrect[2] refers to the minimize button.
146 tabstrip_width -= (tabstrip_width - titlebar_info.rgrect[2].left); 146 tabstrip_width -= (tabstrip_width - titlebar_info.rgrect[2].left);
147 } 147 }
148 int tabstrip_height = tabstrip->GetPreferredHeight(); 148 int tabstrip_height = tabstrip->GetPreferredHeight();
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 192
193 // This check is only done when we have a toolbar, which is the only time 193 // This check is only done when we have a toolbar, which is the only time
194 // that we have a non-standard non-client area. 194 // that we have a non-standard non-client area.
195 if (browser_view_->IsToolbarVisible()) { 195 if (browser_view_->IsToolbarVisible()) {
196 // Because we tell Windows that our client area extends all the way to the 196 // Because we tell Windows that our client area extends all the way to the
197 // top of the browser window, but our BrowserView doesn't actually go up tha t 197 // top of the browser window, but our BrowserView doesn't actually go up tha t
198 // high, we need to make sure the right hit-test codes are returned for the 198 // high, we need to make sure the right hit-test codes are returned for the
199 // caption area above the tabs and the top sizing border. 199 // caption area above the tabs and the top sizing border.
200 int client_view_right = 200 int client_view_right =
201 frame_->client_view()->GetX() + frame_->client_view()->GetWidth(); 201 frame_->client_view()->GetX() + frame_->client_view()->GetWidth();
202 if (point.x() >= frame_->client_view()->GetX() || 202 if (point.x() >= frame_->client_view()->GetX() &&
203 point.x() < client_view_right) { 203 point.x() < client_view_right) {
204 if (point.y() < kWindowSizingBorderSize) 204 if (point.y() < kWindowSizingBorderSize)
205 return HTTOP; 205 return HTTOP;
206 return HTCAPTION; 206 return HTCAPTION;
207 } 207 }
208 } 208 }
209 209
210 // Let Windows figure it out. 210 // Let Windows figure it out.
211 return HTNOWHERE; 211 return HTNOWHERE;
212 } 212 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 resources_ = new AeroGlassWindowResources; 391 resources_ = new AeroGlassWindowResources;
392 ResourceBundle& rb = ResourceBundle::GetSharedInstance(); 392 ResourceBundle& rb = ResourceBundle::GetSharedInstance();
393 SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO); 393 SkBitmap* image = rb.GetBitmapNamed(IDR_DISTRIBUTOR_LOGO);
394 if (!image->isNull()) 394 if (!image->isNull())
395 distributor_logo_ = *image; 395 distributor_logo_ = *image;
396 396
397 initialized = true; 397 initialized = true;
398 } 398 }
399 } 399 }
400 400
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698