| OLD | NEW |
| 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 229 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 | 240 |
| 241 void GlassBrowserFrameView::Layout() { | 241 void GlassBrowserFrameView::Layout() { |
| 242 LayoutOTRAvatar(); | 242 LayoutOTRAvatar(); |
| 243 LayoutClientView(); | 243 LayoutClientView(); |
| 244 LayoutProfileTag(); | 244 LayoutProfileTag(); |
| 245 } | 245 } |
| 246 | 246 |
| 247 bool GlassBrowserFrameView::HitTest(const gfx::Point& l) const { | 247 bool GlassBrowserFrameView::HitTest(const gfx::Point& l) const { |
| 248 // The ProfileMenuButton intrudes into the client area when the window is | 248 // The ProfileMenuButton intrudes into the client area when the window is |
| 249 // maximized. | 249 // maximized. |
| 250 if (frame_->IsMaximized() && show_profile_button() && | 250 return (frame_->IsMaximized() && show_profile_button() && |
| 251 profile_button_->IsVisible() && | 251 profile_button_->IsVisible() && |
| 252 profile_button_->GetMirroredBounds().Contains(l)) { | 252 profile_button_->GetMirroredBounds().Contains(l)) || |
| 253 return true; | 253 !frame_->client_view()->bounds().Contains(l); |
| 254 } else { | |
| 255 return !frame_->client_view()->bounds().Contains(l); | |
| 256 } | |
| 257 } | 254 } |
| 258 | 255 |
| 259 /////////////////////////////////////////////////////////////////////////////// | 256 /////////////////////////////////////////////////////////////////////////////// |
| 260 // GlassBrowserFrameView, private: | 257 // GlassBrowserFrameView, private: |
| 261 | 258 |
| 262 int GlassBrowserFrameView::FrameBorderThickness() const { | 259 int GlassBrowserFrameView::FrameBorderThickness() const { |
| 263 return (frame_->IsMaximized() || frame_->IsFullscreen()) ? | 260 return (frame_->IsMaximized() || frame_->IsFullscreen()) ? |
| 264 0 : GetSystemMetrics(SM_CXSIZEFRAME); | 261 0 : GetSystemMetrics(SM_CXSIZEFRAME); |
| 265 } | 262 } |
| 266 | 263 |
| (...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 static bool initialized = false; | 606 static bool initialized = false; |
| 610 if (!initialized) { | 607 if (!initialized) { |
| 611 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); | 608 ResourceBundle &rb = ResourceBundle::GetSharedInstance(); |
| 612 for (int i = 0; i < kThrobberIconCount; ++i) { | 609 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 613 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); | 610 throbber_icons_[i] = rb.LoadThemeIcon(IDI_THROBBER_01 + i); |
| 614 DCHECK(throbber_icons_[i]); | 611 DCHECK(throbber_icons_[i]); |
| 615 } | 612 } |
| 616 initialized = true; | 613 initialized = true; |
| 617 } | 614 } |
| 618 } | 615 } |
| OLD | NEW |