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

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

Issue 7071018: Merge 86845 - Fix hittesting in the OpaqueBrowserFrameView for frames without a tabstrip. The Hi... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/742/src/
Patch Set: Created 9 years, 7 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/browser/ui/views/frame/opaque_browser_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) 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/glass_browser_frame_view.h" 5 #include "chrome/browser/ui/views/frame/glass_browser_frame_view.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/app/chrome_command_ids.h" 9 #include "chrome/app/chrome_command_ids.h"
10 #include "chrome/app/chrome_dll_resource.h" 10 #include "chrome/app/chrome_dll_resource.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 258
259 void GlassBrowserFrameView::Layout() { 259 void GlassBrowserFrameView::Layout() {
260 LayoutOTRAvatar(); 260 LayoutOTRAvatar();
261 LayoutClientView(); 261 LayoutClientView();
262 LayoutProfileTag(); 262 LayoutProfileTag();
263 } 263 }
264 264
265 bool GlassBrowserFrameView::HitTest(const gfx::Point& l) const { 265 bool GlassBrowserFrameView::HitTest(const gfx::Point& l) const {
266 // The ProfileMenuButton intrudes into the client area when the window is 266 // The ProfileMenuButton intrudes into the client area when the window is
267 // maximized. 267 // maximized.
268 if (frame_->GetWindow()->IsMaximized() && show_profile_button() && 268 return (frame_->GetWindow()->IsMaximized() && show_profile_button() &&
269 profile_button_->IsVisible() && 269 profile_button_->IsVisible() &&
270 profile_button_->GetMirroredBounds().Contains(l)) { 270 profile_button_->GetMirroredBounds().Contains(l)) ||
271 return true; 271 !GetWindow()->client_view()->bounds().Contains(l);
272 } else {
273 return !GetWindow()->client_view()->bounds().Contains(l);
274 }
275 } 272 }
276 273
277 /////////////////////////////////////////////////////////////////////////////// 274 ///////////////////////////////////////////////////////////////////////////////
278 // GlassBrowserFrameView, private: 275 // GlassBrowserFrameView, private:
279 276
280 int GlassBrowserFrameView::FrameBorderThickness() const { 277 int GlassBrowserFrameView::FrameBorderThickness() const {
281 views::Window* window = frame_->GetWindow(); 278 views::Window* window = frame_->GetWindow();
282 return (window->IsMaximized() || window->IsFullscreen()) ? 279 return (window->IsMaximized() || window->IsFullscreen()) ?
283 0 : GetSystemMetrics(SM_CXSIZEFRAME); 280 0 : GetSystemMetrics(SM_CXSIZEFRAME);
284 } 281 }
(...skipping 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
622 static bool initialized = false; 619 static bool initialized = false;
623 if (!initialized) { 620 if (!initialized) {
624 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); 621 ResourceBundle &rb = ResourceBundle::GetSharedInstance();
625 for (int i = 0; i < kThrobberIconCount; ++i) { 622 for (int i = 0; i < kThrobberIconCount; ++i) {
626 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); 623 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i);
627 DCHECK(throbber_icons_[i]); 624 DCHECK(throbber_icons_[i]);
628 } 625 }
629 initialized = true; 626 initialized = true;
630 } 627 }
631 } 628 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/frame/opaque_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698