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

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

Issue 1089003003: Pass a TaskRunner through ViewsDelegate to put AX init on FILE thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Check views delegate Created 5 years, 8 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"
11 #include "base/strings/utf_string_conversions.h" 11 #include "base/strings/utf_string_conversions.h"
12 #include "base/time/time.h" 12 #include "base/time/time.h"
13 #include "chrome/browser/browser_process.h" 13 #include "chrome/browser/browser_process.h"
14 #include "chrome/browser/profiles/profile_manager.h" 14 #include "chrome/browser/profiles/profile_manager.h"
15 #include "chrome/browser/ui/browser_window_state.h" 15 #include "chrome/browser/ui/browser_window_state.h"
16 #include "chrome/common/chrome_version_info.h" 16 #include "chrome/common/chrome_version_info.h"
17 #include "content/public/browser/browser_thread.h"
17 #include "content/public/browser/context_factory.h" 18 #include "content/public/browser/context_factory.h"
18 #include "grit/chrome_unscaled_resources.h" 19 #include "grit/chrome_unscaled_resources.h"
19 #include "ui/base/resource/resource_bundle.h" 20 #include "ui/base/resource/resource_bundle.h"
20 #include "ui/base/ui_base_switches.h" 21 #include "ui/base/ui_base_switches.h"
21 #include "ui/gfx/geometry/rect.h" 22 #include "ui/gfx/geometry/rect.h"
22 #include "ui/gfx/screen.h" 23 #include "ui/gfx/screen.h"
23 #include "ui/views/widget/native_widget.h" 24 #include "ui/views/widget/native_widget.h"
24 #include "ui/views/widget/widget.h" 25 #include "ui/views/widget/widget.h"
25 26
26 #if defined(OS_WIN) 27 #if defined(OS_WIN)
(...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 #endif 382 #endif
382 383
383 ui::ContextFactory* ChromeViewsDelegate::GetContextFactory() { 384 ui::ContextFactory* ChromeViewsDelegate::GetContextFactory() {
384 return content::GetContextFactory(); 385 return content::GetContextFactory();
385 } 386 }
386 387
387 std::string ChromeViewsDelegate::GetApplicationName() { 388 std::string ChromeViewsDelegate::GetApplicationName() {
388 return chrome::VersionInfo().Name(); 389 return chrome::VersionInfo().Name();
389 } 390 }
390 391
392 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
393 scoped_refptr<base::TaskRunner>
394 ChromeViewsDelegate::GetTaskRunnerForAuraLinuxAccessibilityInit() {
395 return content::BrowserThread::GetMessageLoopProxyForThread(
sky 2015/04/27 15:10:14 Add your comment here about why this needs to be o
dmazzoni 2015/04/27 19:52:05 Done.
396 content::BrowserThread::FILE);
397 }
398 #endif
399
391 #if defined(OS_WIN) 400 #if defined(OS_WIN)
392 int ChromeViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor, 401 int ChromeViewsDelegate::GetAppbarAutohideEdges(HMONITOR monitor,
393 const base::Closure& callback) { 402 const base::Closure& callback) {
394 // Initialize the map with EDGE_BOTTOM. This is important, as if we return an 403 // Initialize the map with EDGE_BOTTOM. This is important, as if we return an
395 // initial value of 0 (no auto-hide edges) then we'll go fullscreen and 404 // initial value of 0 (no auto-hide edges) then we'll go fullscreen and
396 // windows will automatically remove WS_EX_TOPMOST from the appbar resulting 405 // windows will automatically remove WS_EX_TOPMOST from the appbar resulting
397 // in us thinking there is no auto-hide edges. By returning at least one edge 406 // in us thinking there is no auto-hide edges. By returning at least one edge
398 // we don't initially go fullscreen until we figure out the real auto-hide 407 // we don't initially go fullscreen until we figure out the real auto-hide
399 // edges. 408 // edges.
400 if (!appbar_autohide_edge_map_.count(monitor)) 409 if (!appbar_autohide_edge_map_.count(monitor))
(...skipping 27 matching lines...) Expand all
428 } 437 }
429 #endif 438 #endif
430 439
431 #if !defined(USE_AURA) && !defined(USE_CHROMEOS) 440 #if !defined(USE_AURA) && !defined(USE_CHROMEOS)
432 views::Widget::InitParams::WindowOpacity 441 views::Widget::InitParams::WindowOpacity
433 ChromeViewsDelegate::GetOpacityForInitParams( 442 ChromeViewsDelegate::GetOpacityForInitParams(
434 const views::Widget::InitParams& params) { 443 const views::Widget::InitParams& params) {
435 return views::Widget::InitParams::OPAQUE_WINDOW; 444 return views::Widget::InitParams::OPAQUE_WINDOW;
436 } 445 }
437 #endif 446 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/chrome_views_delegate.h ('k') | ui/accessibility/platform/atk_util_auralinux.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698