Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / ash / chrome_browser_main_extra_parts_ash.cc
index 87a0b73..85ba9a2 100644 (file)
@@ -19,7 +19,6 @@
 #include "ui/gfx/screen_type_delegate.h"
 #include "ui/keyboard/keyboard.h"
 #include "ui/keyboard/keyboard_controller.h"
-#include "ui/keyboard/keyboard_util.h"
 
 #if defined(OS_CHROMEOS)
 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
 #include "ui/shell_dialogs/shell_dialogs_delegate.h"
 #endif
 
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
 #if !defined(OS_CHROMEOS)
 class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate {
  public:
@@ -49,6 +52,10 @@ class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate {
  public:
   ShellDialogsDelegateWin() {}
   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);
   }
  private:
@@ -99,12 +106,9 @@ void ChromeBrowserMainExtraPartsAsh::PostProfileInit() {
   // Initialize TabScrubber after the Ash Shell has been initialized.
   TabScrubber::GetInstance();
   // Activate virtual keyboard after profile is initialized. It depends on the
-  // default profile. If keyboard usability experiment flag is set, defer the
-  // activation to UpdateWindow() in virtual_keyboard_window_controller.cc.
-  if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
-    ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
-        keyboard::KeyboardController::GetInstance());
-  }
+  // default profile.
+  ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
+      keyboard::KeyboardController::GetInstance());
 }
 
 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {