Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: chrome/browser/ui/views/ash/chrome_browser_main_extra_parts_ash.cc

Issue 510223002: Fixed a crash while opening the file open/save dialogs on Windows 7 ASH. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: dir Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 13 matching lines...) Expand all
24 #if defined(OS_CHROMEOS) 24 #if defined(OS_CHROMEOS)
25 #include "chrome/browser/ui/views/select_file_dialog_extension.h" 25 #include "chrome/browser/ui/views/select_file_dialog_extension.h"
26 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h" 26 #include "chrome/browser/ui/views/select_file_dialog_extension_factory.h"
27 #endif 27 #endif
28 28
29 #if !defined(OS_CHROMEOS) 29 #if !defined(OS_CHROMEOS)
30 #include "ui/shell_dialogs/select_file_dialog.h" 30 #include "ui/shell_dialogs/select_file_dialog.h"
31 #include "ui/shell_dialogs/shell_dialogs_delegate.h" 31 #include "ui/shell_dialogs/shell_dialogs_delegate.h"
32 #endif 32 #endif
33 33
34 #if defined(OS_WIN)
35 #include "base/win/windows_version.h"
36 #endif
37
34 #if !defined(OS_CHROMEOS) 38 #if !defined(OS_CHROMEOS)
35 class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate { 39 class ScreenTypeDelegateWin : public gfx::ScreenTypeDelegate {
36 public: 40 public:
37 ScreenTypeDelegateWin() {} 41 ScreenTypeDelegateWin() {}
38 virtual gfx::ScreenType GetScreenTypeForNativeView( 42 virtual gfx::ScreenType GetScreenTypeForNativeView(
39 gfx::NativeView view) OVERRIDE { 43 gfx::NativeView view) OVERRIDE {
40 return chrome::IsNativeViewInAsh(view) ? 44 return chrome::IsNativeViewInAsh(view) ?
41 gfx::SCREEN_TYPE_ALTERNATE : 45 gfx::SCREEN_TYPE_ALTERNATE :
42 gfx::SCREEN_TYPE_NATIVE; 46 gfx::SCREEN_TYPE_NATIVE;
43 } 47 }
44 private: 48 private:
45 DISALLOW_COPY_AND_ASSIGN(ScreenTypeDelegateWin); 49 DISALLOW_COPY_AND_ASSIGN(ScreenTypeDelegateWin);
46 }; 50 };
47 51
48 class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate { 52 class ShellDialogsDelegateWin : public ui::ShellDialogsDelegate {
49 public: 53 public:
50 ShellDialogsDelegateWin() {} 54 ShellDialogsDelegateWin() {}
51 virtual bool IsWindowInMetro(gfx::NativeWindow window) OVERRIDE { 55 virtual bool IsWindowInMetro(gfx::NativeWindow window) OVERRIDE {
56 #if defined(OS_WIN)
57 if (base::win::GetVersion() < base::win::VERSION_WIN8)
58 return false;
59 #endif
52 return chrome::IsNativeViewInAsh(window); 60 return chrome::IsNativeViewInAsh(window);
53 } 61 }
54 private: 62 private:
55 DISALLOW_COPY_AND_ASSIGN(ShellDialogsDelegateWin); 63 DISALLOW_COPY_AND_ASSIGN(ShellDialogsDelegateWin);
56 }; 64 };
57 65
58 base::LazyInstance<ShellDialogsDelegateWin> g_shell_dialogs_delegate; 66 base::LazyInstance<ShellDialogsDelegateWin> g_shell_dialogs_delegate;
59 67
60 #endif 68 #endif
61 69
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc. 111 // activation to UpdateWindow() in virtual_keyboard_window_controller.cc.
104 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) { 112 if (!keyboard::IsKeyboardUsabilityExperimentEnabled()) {
105 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard( 113 ash::Shell::GetPrimaryRootWindowController()->ActivateKeyboard(
106 keyboard::KeyboardController::GetInstance()); 114 keyboard::KeyboardController::GetInstance());
107 } 115 }
108 } 116 }
109 117
110 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() { 118 void ChromeBrowserMainExtraPartsAsh::PostMainMessageLoopRun() {
111 chrome::CloseAsh(); 119 chrome::CloseAsh();
112 } 120 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698