Chromium Code Reviews| Index: chrome/browser/ui/views/frame/browser_view.cc |
| diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc |
| index 3b3b4dd7247e0a1d84ea71220ab841c8490a4688..b38dc8da968c8ebc4a95c98e022f5ad49fc398c9 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -147,13 +147,11 @@ |
| #include "ui/views/widget/widget.h" |
| #include "ui/views/window/dialog_delegate.h" |
| -#if !defined(OS_CHROMEOS) |
| -#include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| -#endif |
| - |
| -#if defined(USE_ASH) |
| +#if defined(OS_CHROMEOS) |
| #include "chrome/browser/ui/ash/ash_util.h" |
| -#endif |
| +#else // defined(OS_CHROMEOS) |
| +#include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
| +#endif // !defined(OS_CHROMEOS) |
|
sky
2017/02/01 21:36:12
Conditional ifdefs are harder to read. Please star
Qiang(Joe) Xu
2017/02/01 21:54:23
Done.
|
| #if defined(USE_AURA) |
| #include "ui/aura/client/window_parenting_client.h" |
| @@ -526,11 +524,6 @@ gfx::Point BrowserView::OffsetPointForToolbarBackgroundImage( |
| } |
| bool BrowserView::IsTabStripVisible() const { |
| - if (immersive_mode_controller_->ShouldHideTopViews() && |
| - immersive_mode_controller_->ShouldHideTabIndicators()) { |
| - return false; |
| - } |
| - |
| // Return false if this window does not normally display a tabstrip. |
| if (!browser_->SupportsWindowFeature(Browser::FEATURE_TABSTRIP)) |
| return false; |
| @@ -593,7 +586,7 @@ WebContents* BrowserView::GetActiveWebContents() const { |
| // BrowserView, BrowserWindow implementation: |
| void BrowserView::Show() { |
| -#if !defined(OS_WIN) && !defined(USE_ASH) |
| +#if !defined(OS_WIN) && !defined(OS_CHROMEOS) |
| // The Browser associated with this browser window must become the active |
| // browser at the time |Show()| is called. This is the natural behavior under |
| // Windows and Ash, but other platforms will not trigger |
| @@ -1658,12 +1651,12 @@ views::View* BrowserView::GetInitiallyFocusedView() { |
| } |
| bool BrowserView::ShouldShowWindowTitle() const { |
| -#if defined(USE_ASH) |
| +#if defined(OS_CHROMEOS) |
| // For Ash only, trusted windows (apps and settings) do not show a title, |
|
sky
2017/02/01 21:36:12
Ash -> Chrome OS (I think I'm not sure what the ri
Qiang(Joe) Xu
2017/02/01 21:54:23
Done.
|
| // crbug.com/119411. Child windows (i.e. popups) do show a title. |
| if (browser_->is_trusted_source()) |
| return false; |
| -#endif // USE_ASH |
| +#endif // OS_CHROMEOS |
| return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); |
| } |
| @@ -1692,12 +1685,12 @@ gfx::ImageSkia BrowserView::GetWindowIcon() { |
| } |
| bool BrowserView::ShouldShowWindowIcon() const { |
| -#if defined(USE_ASH) |
| +#if defined(OS_CHROMEOS) |
| // For Ash only, trusted windows (apps and settings) do not show an icon, |
| // crbug.com/119411. Child windows (i.e. popups) do show an icon. |
| if (browser_->is_trusted_source()) |
| return false; |
| -#endif // USE_ASH |
| +#endif // OS_CHROMEOS |
| return browser_->SupportsWindowFeature(Browser::FEATURE_TITLEBAR); |
| } |
| @@ -2352,7 +2345,7 @@ void BrowserView::ProcessFullscreen(bool fullscreen, |
| } |
| bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { |
| -#if defined(USE_ASH) |
| +#if defined(OS_CHROMEOS) |
| // Kiosk mode needs the whole screen. |
| if (base::CommandLine::ForCurrentProcess()->HasSwitch(switches::kKioskMode)) |
| return false; |
| @@ -2361,7 +2354,7 @@ bool BrowserView::ShouldUseImmersiveFullscreenForUrl(const GURL& url) const { |
| #else |
| // No immersive except in Ash. |
| return false; |
| -#endif // !USE_ASH |
| +#endif |
| } |
| void BrowserView::LoadAccelerators() { |