Commit b7f1a202 authored by ananta's avatar ananta Committed by Commit bot

Fixed a crash while opening the file open/save dialogs on Windows 7 ASH.

The operations would get routed to the viewer process under the assumption that it was Windows 8
which would eventually crash while trying to open the metro dialogs which don't work on Windows 7.

Fix is to return false from the ShellDialogsDelegateWin::IsWindowInMetro function for anything below
Windows 8.

BUG=356475

Review URL: https://codereview.chromium.org/510223002

Cr-Commit-Position: refs/heads/master@{#292520}
parent fe58512f
...@@ -31,6 +31,10 @@ ...@@ -31,6 +31,10 @@
#include "ui/shell_dialogs/shell_dialogs_delegate.h" #include "ui/shell_dialogs/shell_dialogs_delegate.h"
#endif #endif
#if defined(OS_WIN)
#include "base/win/windows_version.h"
#endif
#if !defined(OS_CHROMEOS) #if !defined(OS_CHROMEOS)
class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate { class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate {
public: public:
...@@ -49,6 +53,10 @@ class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate { ...@@ -49,6 +53,10 @@ class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate {
public: public:
ShellDialogsDelegateWin() {} ShellDialogsDelegateWin() {}
virtual bool IsWindowInMetro(gfx::NativeWindow window) OVERRIDE { virtual bool IsWindowInMetro(gfx::NativeWindow window) OVERRIDE {
#if defined(OS_WIN)
if (base::win::GetVersion() < base::win::VERSION_WIN8)
return false;
#endif
return chrome::IsNativeViewInAsh(window); return chrome::IsNativeViewInAsh(window);
} }
private: private:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment