| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
| (...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 285 new_avatar_button()->GetMirroredBounds().Intersects(rect); | 285 new_avatar_button()->GetMirroredBounds().Intersects(rect); |
| 286 return hit_avatar_button || hit_new_avatar_button || | 286 return hit_avatar_button || hit_new_avatar_button || |
| 287 !frame()->client_view()->bounds().Intersects(rect); | 287 !frame()->client_view()->bounds().Intersects(rect); |
| 288 } | 288 } |
| 289 | 289 |
| 290 /////////////////////////////////////////////////////////////////////////////// | 290 /////////////////////////////////////////////////////////////////////////////// |
| 291 // GlassBrowserFrameView, views::ButtonListener overrides: | 291 // GlassBrowserFrameView, views::ButtonListener overrides: |
| 292 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, | 292 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, |
| 293 const ui::Event& event) { | 293 const ui::Event& event) { |
| 294 if (sender == new_avatar_button()) | 294 if (sender == new_avatar_button()) |
| 295 ShowProfileChooserViewBubble(); | 295 browser_view()->ShowAvatarBubbleFromAvatarButton(); |
| 296 } | 296 } |
| 297 | 297 |
| 298 /////////////////////////////////////////////////////////////////////////////// | 298 /////////////////////////////////////////////////////////////////////////////// |
| 299 // GlassBrowserFrameView, private: | 299 // GlassBrowserFrameView, private: |
| 300 | 300 |
| 301 int GlassBrowserFrameView::FrameBorderThickness() const { | 301 int GlassBrowserFrameView::FrameBorderThickness() const { |
| 302 return (frame()->IsMaximized() || frame()->IsFullscreen()) ? | 302 return (frame()->IsMaximized() || frame()->IsFullscreen()) ? |
| 303 0 : GetSystemMetrics(SM_CXSIZEFRAME); | 303 0 : GetSystemMetrics(SM_CXSIZEFRAME); |
| 304 } | 304 } |
| 305 | 305 |
| (...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 585 static bool initialized = false; | 585 static bool initialized = false; |
| 586 if (!initialized) { | 586 if (!initialized) { |
| 587 for (int i = 0; i < kThrobberIconCount; ++i) { | 587 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 588 throbber_icons_[i] = | 588 throbber_icons_[i] = |
| 589 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 589 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 590 DCHECK(throbber_icons_[i]); | 590 DCHECK(throbber_icons_[i]); |
| 591 } | 591 } |
| 592 initialized = true; | 592 initialized = true; |
| 593 } | 593 } |
| 594 } | 594 } |
| OLD | NEW |