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 772be52355d864de2a2ceb1a8eac4b623729f37e..16045a4138a387fd5dc93a3e05b2e500e2cac3ee 100644 |
| --- a/chrome/browser/ui/views/frame/browser_view.cc |
| +++ b/chrome/browser/ui/views/frame/browser_view.cc |
| @@ -130,12 +130,6 @@ |
| #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| #include "chrome/browser/ui/ash/launcher/browser_launcher_item_controller.h" |
| #include "chrome/browser/ui/ash/window_positioner.h" |
| -#elif defined(OS_WIN) && !defined(USE_AURA) |
| -#include "base/win/metro.h" |
| -#include "chrome/browser/jumplist_win.h" |
| -#include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" |
| -#include "ui/views/widget/native_widget_win.h" |
| -#include "ui/views/win/scoped_fullscreen_visibility.h" |
| #endif |
| #if defined(USE_AURA) |
| @@ -143,6 +137,15 @@ |
| #include "chrome/browser/ui/webui/task_manager/task_manager_dialog.h" |
| #include "ui/aura/window.h" |
| #include "ui/gfx/screen.h" |
| +#elif defined(OS_WIN) |
|
robertshield
2012/12/03 19:48:48
I feel that this would be more readable as a stand
gab
2012/12/04 00:19:06
Ok, added comment at end of line.
|
| +#include "chrome/browser/jumplist_win.h" |
| +#include "chrome/browser/ui/views/omnibox/omnibox_view_win.h" |
| +#include "ui/views/widget/native_widget_win.h" |
| +#include "ui/views/win/scoped_fullscreen_visibility.h" |
| +#endif |
| + |
| +#if defined(OS_WIN) |
| +#include "win8/util/win8_util.h" |
| #endif |
| #if defined(ENABLE_ONE_CLICK_SIGNIN) |
| @@ -184,10 +187,10 @@ const int BrowserView::kToolbarIndex = 2; |
| namespace { |
| bool ShouldSaveOrRestoreWindowPos() { |
| -#if defined(OS_WIN) && !defined(USE_AURA) |
| +#if defined(OS_WIN) |
| // In Windows 8 metro mode the window is always maximized (without the |
|
cpu_(ooo_6.6-7.5)
2012/12/03 20:56:26
reword
gab
2012/12/04 00:19:06
Done.
|
| - // WS_MAXIMIZE) style. |
| - if (base::win::IsMetroProcess()) |
| + // WS_MAXIMIZE style). |
| + if (win8::IsSingleWindowMetroMode()) |
| return false; |
| #endif |
| return true; |
| @@ -1551,12 +1554,8 @@ bool BrowserView::IsInstantTabShowing() { |
| WindowOpenDisposition BrowserView::GetDispositionForPopupBounds( |
| const gfx::Rect& bounds) { |
| #if defined(OS_WIN) |
| -#if defined(USE_AURA) |
| - return NEW_POPUP; |
| -#else |
| // If we are in windows metro-mode, we can't allow popup windows. |
|
cpu_(ooo_6.6-7.5)
2012/12/03 20:56:26
reword
gab
2012/12/04 00:19:06
Done.
|
| - return base::win::IsMetroProcess() ? NEW_BACKGROUND_TAB : NEW_POPUP; |
| -#endif |
| + return win8::IsSingleWindowMetroMode() ? NEW_BACKGROUND_TAB : NEW_POPUP; |
| #else |
| return NEW_POPUP; |
| #endif |
| @@ -1789,12 +1788,12 @@ bool BrowserView::ShouldShowWindowIcon() const { |
| bool BrowserView::ExecuteWindowsCommand(int command_id) { |
| // This function handles WM_SYSCOMMAND, WM_APPCOMMAND, and WM_COMMAND. |
| -#if defined(OS_WIN) && !defined(USE_AURA) |
| +#if defined(OS_WIN) |
| if (command_id == IDC_DEBUG_FRAME_TOGGLE) |
| GetWidget()->DebugToggleFrameType(); |
|
robertshield
2012/12/03 19:48:48
this introduces a change in behaviour for the line
gab
2012/12/04 00:19:06
This is can only ever be called if switches::kDebu
|
| // In Windows 8 metro mode prevent sizing and moving. |
| - if (base::win::IsMetroProcess()) { |
| + if (win8::IsSingleWindowMetroMode()) { |
| // Windows uses the 4 lower order bits of |notification_code| for type- |
| // specific information so we must exclude this when comparing. |
| static const int sc_mask = 0xFFF0; |
| @@ -2130,8 +2129,8 @@ int BrowserView::GetOTRIconResourceID() const { |
| if (ui::GetDisplayLayout() == ui::LAYOUT_TOUCH) { |
| if (IsFullscreen()) |
| otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
| -#if defined(OS_WIN) && !defined(USE_AURA) |
| - if (base::win::IsMetroProcess()) |
| +#if defined(OS_WIN) |
| + if (win8::IsSingleWindowMetroMode()) |
| otr_resource_id = IDR_OTR_ICON_FULLSCREEN; |
| #endif |
| } |