| 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/browser_non_client_frame_view_ash.h" | 5 #include "chrome/browser/ui/views/frame/browser_non_client_frame_view_ash.h" |
| 6 | 6 |
| 7 #include "ash/shell_delegate.h" | 7 #include "ash/shell_delegate.h" |
| 8 #include "ash/wm/frame_painter.h" | 8 #include "ash/wm/frame_painter.h" |
| 9 #include "ash/wm/workspace/frame_maximize_button.h" | 9 #include "ash/wm/workspace/frame_maximize_button.h" |
| 10 #include "chrome/browser/themes/theme_properties.h" | 10 #include "chrome/browser/themes/theme_properties.h" |
| 11 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" | 11 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 12 #include "chrome/browser/ui/browser.h" | 12 #include "chrome/browser/ui/browser.h" |
| 13 #include "chrome/browser/ui/immersive_fullscreen_configuration.h" |
| 13 #include "chrome/browser/ui/views/avatar_menu_button.h" | 14 #include "chrome/browser/ui/views/avatar_menu_button.h" |
| 14 #include "chrome/browser/ui/views/frame/browser_frame.h" | 15 #include "chrome/browser/ui/views/frame/browser_frame.h" |
| 15 #include "chrome/browser/ui/views/frame/browser_view.h" | 16 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 16 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" | 17 #include "chrome/browser/ui/views/frame/immersive_mode_controller.h" |
| 17 #include "chrome/browser/ui/views/tab_icon_view.h" | 18 #include "chrome/browser/ui/views/tab_icon_view.h" |
| 18 #include "chrome/browser/ui/views/tabs/tab_strip.h" | 19 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 19 #include "content/public/browser/web_contents.h" | 20 #include "content/public/browser/web_contents.h" |
| 20 #include "grit/ash_resources.h" | 21 #include "grit/ash_resources.h" |
| 21 #include "grit/generated_resources.h" // Accessibility names | 22 #include "grit/generated_resources.h" // Accessibility names |
| 22 #include "grit/theme_resources.h" | 23 #include "grit/theme_resources.h" |
| (...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 } | 176 } |
| 176 return hit_test; | 177 return hit_test; |
| 177 } | 178 } |
| 178 | 179 |
| 179 void BrowserNonClientFrameViewAsh::GetWindowMask(const gfx::Size& size, | 180 void BrowserNonClientFrameViewAsh::GetWindowMask(const gfx::Size& size, |
| 180 gfx::Path* window_mask) { | 181 gfx::Path* window_mask) { |
| 181 // Aura does not use window masks. | 182 // Aura does not use window masks. |
| 182 } | 183 } |
| 183 | 184 |
| 184 void BrowserNonClientFrameViewAsh::ResetWindowControls() { | 185 void BrowserNonClientFrameViewAsh::ResetWindowControls() { |
| 185 if (chrome::UseImmersiveFullscreen()) { | 186 if (ImmersiveFullscreenConfiguration::UseImmersiveFullscreen()) { |
| 186 // Hide the caption buttons in immersive mode because it's confusing when | 187 // Hide the caption buttons in immersive mode because it's confusing when |
| 187 // the user hovers or clicks in the top-right of the screen and hits one. | 188 // the user hovers or clicks in the top-right of the screen and hits one. |
| 188 // Only show them during a reveal. | 189 // Only show them during a reveal. |
| 189 ImmersiveModeController* controller = | 190 ImmersiveModeController* controller = |
| 190 browser_view()->immersive_mode_controller(); | 191 browser_view()->immersive_mode_controller(); |
| 191 if (controller->IsEnabled()) { | 192 if (controller->IsEnabled()) { |
| 192 bool revealed = controller->IsRevealed(); | 193 bool revealed = controller->IsRevealed(); |
| 193 size_button_->SetVisible(revealed); | 194 size_button_->SetVisible(revealed); |
| 194 close_button_->SetVisible(revealed); | 195 close_button_->SetVisible(revealed); |
| 195 } else { | 196 } else { |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 535 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { | 536 int BrowserNonClientFrameViewAsh::GetThemeFrameOverlayImageId() const { |
| 536 ui::ThemeProvider* tp = GetThemeProvider(); | 537 ui::ThemeProvider* tp = GetThemeProvider(); |
| 537 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && | 538 if (tp->HasCustomImage(IDR_THEME_FRAME_OVERLAY) && |
| 538 browser_view()->IsBrowserTypeNormal() && | 539 browser_view()->IsBrowserTypeNormal() && |
| 539 !browser_view()->IsOffTheRecord()) { | 540 !browser_view()->IsOffTheRecord()) { |
| 540 return ShouldPaintAsActive() ? | 541 return ShouldPaintAsActive() ? |
| 541 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; | 542 IDR_THEME_FRAME_OVERLAY : IDR_THEME_FRAME_OVERLAY_INACTIVE; |
| 542 } | 543 } |
| 543 return 0; | 544 return 0; |
| 544 } | 545 } |
| OLD | NEW |