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

Side by Side Diff: chrome/browser/ui/views/chrome_views_delegate.cc

Issue 1040863002: Revert "Enable chrome.automation.getDesktop on all aura platforms." (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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
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/chrome_views_delegate.h" 5 #include "chrome/browser/ui/views/chrome_views_delegate.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/prefs/pref_service.h" 8 #include "base/prefs/pref_service.h"
9 #include "base/prefs/scoped_user_pref_update.h" 9 #include "base/prefs/scoped_user_pref_update.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 17 matching lines...) Expand all
28 #include <shellapi.h> 28 #include <shellapi.h>
29 #include "base/profiler/scoped_tracker.h" 29 #include "base/profiler/scoped_tracker.h"
30 #include "base/task_runner_util.h" 30 #include "base/task_runner_util.h"
31 #include "base/win/windows_version.h" 31 #include "base/win/windows_version.h"
32 #include "chrome/browser/app_icon_win.h" 32 #include "chrome/browser/app_icon_win.h"
33 #include "content/public/browser/browser_thread.h" 33 #include "content/public/browser/browser_thread.h"
34 #include "ui/base/win/shell.h" 34 #include "ui/base/win/shell.h"
35 #endif 35 #endif
36 36
37 #if defined(USE_AURA) 37 #if defined(USE_AURA)
38 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h"
39 #include "ui/aura/window.h" 38 #include "ui/aura/window.h"
40 #include "ui/aura/window_event_dispatcher.h" 39 #include "ui/aura/window_event_dispatcher.h"
41 #endif 40 #endif
42 41
43 #if defined(USE_AURA) && !defined(OS_CHROMEOS) 42 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
44 #include "chrome/browser/ui/host_desktop.h" 43 #include "chrome/browser/ui/host_desktop.h"
45 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h" 44 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
46 #include "ui/views/widget/native_widget_aura.h" 45 #include "ui/views/widget/native_widget_aura.h"
47 #endif 46 #endif
48 47
49 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 48 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
50 #include "ui/views/linux_ui/linux_ui.h" 49 #include "ui/views/linux_ui/linux_ui.h"
51 #endif 50 #endif
52 51
53 #if defined(USE_ASH) 52 #if defined(USE_ASH)
54 #include "ash/shell.h" 53 #include "ash/shell.h"
55 #include "ash/wm/window_state.h" 54 #include "ash/wm/window_state.h"
55 #include "chrome/browser/ui/ash/accessibility/automation_manager_ash.h"
56 #include "chrome/browser/ui/ash/ash_init.h" 56 #include "chrome/browser/ui/ash/ash_init.h"
57 #include "chrome/browser/ui/ash/ash_util.h" 57 #include "chrome/browser/ui/ash/ash_util.h"
58 #endif 58 #endif
59 59
60 60
61 // Helpers -------------------------------------------------------------------- 61 // Helpers --------------------------------------------------------------------
62 62
63 namespace { 63 namespace {
64 64
65 Profile* GetProfileForWindow(const views::Widget* window) { 65 Profile* GetProfileForWindow(const views::Widget* window) {
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 GetDisplayMatching(*bounds); 206 GetDisplayMatching(*bounds);
207 bounds->AdjustToFit(display.work_area()); 207 bounds->AdjustToFit(display.work_area());
208 ash::wm::GetWindowState(window)->set_minimum_visibility(true); 208 ash::wm::GetWindowState(window)->set_minimum_visibility(true);
209 } 209 }
210 #endif 210 #endif
211 return true; 211 return true;
212 } 212 }
213 213
214 void ChromeViewsDelegate::NotifyAccessibilityEvent( 214 void ChromeViewsDelegate::NotifyAccessibilityEvent(
215 views::View* view, ui::AXEvent event_type) { 215 views::View* view, ui::AXEvent event_type) {
216 #if defined(USE_AURA) 216 #if defined(USE_ASH)
217 AutomationManagerAura::GetInstance()->HandleEvent( 217 AutomationManagerAsh::GetInstance()->HandleEvent(
218 GetProfileForWindow(view->GetWidget()), view, event_type); 218 GetProfileForWindow(view->GetWidget()), view, event_type);
219 #endif 219 #endif
220 } 220 }
221 221
222 #if defined(OS_WIN) 222 #if defined(OS_WIN)
223 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const { 223 HICON ChromeViewsDelegate::GetDefaultWindowIcon() const {
224 return GetAppIcon(); 224 return GetAppIcon();
225 } 225 }
226 226
227 HICON ChromeViewsDelegate::GetSmallWindowIcon() const { 227 HICON ChromeViewsDelegate::GetSmallWindowIcon() const {
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 } 428 }
429 #endif 429 #endif
430 430
431 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) 431 #if !defined(USE_AURA) && !defined(USE_CHROMEOS)
432 views::Widget::InitParams::WindowOpacity 432 views::Widget::InitParams::WindowOpacity
433 ChromeViewsDelegate::GetOpacityForInitParams( 433 ChromeViewsDelegate::GetOpacityForInitParams(
434 const views::Widget::InitParams& params) { 434 const views::Widget::InitParams& params) {
435 return views::Widget::InitParams::OPAQUE_WINDOW; 435 return views::Widget::InitParams::OPAQUE_WINDOW;
436 } 436 }
437 #endif 437 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/aura/accessibility/ax_tree_source_aura.cc ('k') | chrome/chrome_browser_ui.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698