| 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/prefs/pref_service.h" | 7 #include "base/prefs/pref_service.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/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" |
| 11 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 12 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 13 #include "chrome/browser/signin/signin_header_helper.h" |
| 13 #include "chrome/browser/themes/theme_properties.h" | 14 #include "chrome/browser/themes/theme_properties.h" |
| 14 #include "chrome/browser/ui/views/frame/browser_view.h" | 15 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 15 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" | 16 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" |
| 16 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" | 17 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" |
| 17 #include "chrome/browser/ui/views/tabs/tab.h" | 18 #include "chrome/browser/ui/views/tabs/tab.h" |
| 18 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 19 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 19 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" | 20 #include "chrome/browser/ui/views/toolbar/toolbar_view.h" |
| 20 #include "chrome/common/pref_names.h" | 21 #include "chrome/common/pref_names.h" |
| 21 #include "components/signin/core/common/profile_management_switches.h" | 22 #include "components/signin/core/common/profile_management_switches.h" |
| 22 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 279 return hit_avatar_button || hit_new_avatar_button || | 280 return hit_avatar_button || hit_new_avatar_button || |
| 280 !frame()->client_view()->bounds().Intersects(rect); | 281 !frame()->client_view()->bounds().Intersects(rect); |
| 281 } | 282 } |
| 282 | 283 |
| 283 /////////////////////////////////////////////////////////////////////////////// | 284 /////////////////////////////////////////////////////////////////////////////// |
| 284 // GlassBrowserFrameView, views::ButtonListener overrides: | 285 // GlassBrowserFrameView, views::ButtonListener overrides: |
| 285 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, | 286 void GlassBrowserFrameView::ButtonPressed(views::Button* sender, |
| 286 const ui::Event& event) { | 287 const ui::Event& event) { |
| 287 if (sender == new_avatar_button()) { | 288 if (sender == new_avatar_button()) { |
| 288 browser_view()->ShowAvatarBubbleFromAvatarButton( | 289 browser_view()->ShowAvatarBubbleFromAvatarButton( |
| 289 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT); | 290 BrowserWindow::AVATAR_BUBBLE_MODE_DEFAULT, |
| 291 signin::GAIA_SERVICE_TYPE_NONE); |
| 290 } | 292 } |
| 291 } | 293 } |
| 292 | 294 |
| 293 /////////////////////////////////////////////////////////////////////////////// | 295 /////////////////////////////////////////////////////////////////////////////// |
| 294 // GlassBrowserFrameView, private: | 296 // GlassBrowserFrameView, private: |
| 295 | 297 |
| 296 int GlassBrowserFrameView::FrameBorderThickness() const { | 298 int GlassBrowserFrameView::FrameBorderThickness() const { |
| 297 return (frame()->IsMaximized() || frame()->IsFullscreen()) ? | 299 return (frame()->IsMaximized() || frame()->IsFullscreen()) ? |
| 298 0 : GetSystemMetrics(SM_CXSIZEFRAME); | 300 0 : GetSystemMetrics(SM_CXSIZEFRAME); |
| 299 } | 301 } |
| (...skipping 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 static bool initialized = false; | 586 static bool initialized = false; |
| 585 if (!initialized) { | 587 if (!initialized) { |
| 586 for (int i = 0; i < kThrobberIconCount; ++i) { | 588 for (int i = 0; i < kThrobberIconCount; ++i) { |
| 587 throbber_icons_[i] = | 589 throbber_icons_[i] = |
| 588 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); | 590 ui::LoadThemeIconFromResourcesDataDLL(IDI_THROBBER_01 + i); |
| 589 DCHECK(throbber_icons_[i]); | 591 DCHECK(throbber_icons_[i]); |
| 590 } | 592 } |
| 591 initialized = true; | 593 initialized = true; |
| 592 } | 594 } |
| 593 } | 595 } |
| OLD | NEW |