| 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/ash/chrome_browser_main_extra_parts_ash.h" | 5 #include "chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.h" |
| 6 | 6 |
| 7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
| 8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
| 9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 21 matching lines...) Expand all Loading... |
| 32 | 32 |
| 33 #if defined(OS_WIN) | 33 #if defined(OS_WIN) |
| 34 #include "base/win/windows_version.h" | 34 #include "base/win/windows_version.h" |
| 35 #endif | 35 #endif |
| 36 | 36 |
| 37 #if !defined(OS_CHROMEOS) | 37 #if !defined(OS_CHROMEOS) |
| 38 class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate { | 38 class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate { |
| 39 public: | 39 public: |
| 40 ScreenTypeDelegateWin() {} | 40 ScreenTypeDelegateWin() {} |
| 41 virtual gfx::ScreenType GetScreenTypeForNativeView( | 41 virtual gfx::ScreenType GetScreenTypeForNativeView( |
| 42 gfx::NativeView view) OVERRIDE { | 42 gfx::NativeView view) override { |
| 43 return chrome::IsNativeViewInAsh(view) ? | 43 return chrome::IsNativeViewInAsh(view) ? |
| 44 gfx::SCREEN_TYPE_ALTERNATE : | 44 gfx::SCREEN_TYPE_ALTERNATE : |
| 45 gfx::SCREEN_TYPE_NATIVE; | 45 gfx::SCREEN_TYPE_NATIVE; |
| 46 } | 46 } |
| 47 private: | 47 private: |
| 48 DISALLOW_COPY_AND_ASSIGN(ScreenTypeDelegateWin); | 48 DISALLOW_COPY_AND_ASSIGN(ScreenTypeDelegateWin); |
| 49 }; | 49 }; |
| 50 | 50 |
| 51 class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate { | 51 class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate { |
| 52 public: | 52 public: |
| 53 ShellDialogsDelegateWin() {} | 53 ShellDialogsDelegateWin() {} |
| 54 virtual bool IsWindowInMetro(gfx::NativeWindow window) OVERRIDE { | 54 virtual bool IsWindowInMetro(gfx::NativeWindow window) override { |
| 55 #if defined(OS_WIN) | 55 #if defined(OS_WIN) |
| 56 if (base::win::GetVersion() < base::win::VERSION_WIN8) | 56 if (base::win::GetVersion() < base::win::VERSION_WIN8) |
| 57 return false; | 57 return false; |
| 58 #endif | 58 #endif |
| 59 return chrome::IsNativeViewInAsh(window); | 59 return chrome::IsNativeViewInAsh(window); |
| 60 } | 60 } |
| 61 private: | 61 private: |
| 62 DISALLOW_COPY_AND_ASSIGN(ShellDialogsDelegateWin); | 62 DISALLOW_COPY_AND_ASSIGN(ShellDialogsDelegateWin); |
| 63 }; | 63 }; |
| 64 | 64 |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 TabScrubber::GetInstance(); | 107 TabScrubber::GetInstance(); |
| 108 // Activate virtual keyboard after profile is initialized. It depends on the | 108 // Activate virtual keyboard after profile is initialized. It depends on the |
| 109 // default profile. | 109 // default profile. |
| 110 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( | 110 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( |
| 111 keyboard::KeyboardController::GetInstance()); | 111 keyboard::KeyboardController::GetInstance()); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { | 114 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { |
| 115 chrome::CloseAsh(); | 115 chrome::CloseAsh(); |
| 116 } | 116 } |
| OLD | NEW |