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

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

Issue 1960293003: Remove OS_CHROMEOS from ui/ash code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 <memory> 7 #include <memory>
8 8
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 54 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
55 #include "ui/views/linux_ui/linux_ui.h" 55 #include "ui/views/linux_ui/linux_ui.h"
56 #endif 56 #endif
57 57
58 #if defined(USE_ASH) 58 #if defined(USE_ASH)
59 #include "ash/accelerators/accelerator_controller.h" 59 #include "ash/accelerators/accelerator_controller.h"
60 #include "ash/shell.h" 60 #include "ash/shell.h"
61 #include "ash/wm/common/window_state.h" 61 #include "ash/wm/common/window_state.h"
62 #include "ash/wm/window_state_aura.h" 62 #include "ash/wm/window_state_aura.h"
63 #include "chrome/browser/ui/ash/ash_init.h" 63 #include "chrome/browser/ui/ash/ash_init.h"
64 #include "chrome/browser/ui/ash/ash_util.h"
65 #endif 64 #endif
66 65
67 // Helpers -------------------------------------------------------------------- 66 // Helpers --------------------------------------------------------------------
68 67
69 namespace { 68 namespace {
70 69
71 Profile* GetProfileForWindow(const views::Widget* window) { 70 Profile* GetProfileForWindow(const views::Widget* window) {
72 if (!window) 71 if (!window)
73 return NULL; 72 return NULL;
74 return reinterpret_cast<Profile*>( 73 return reinterpret_cast<Profile*>(
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS) 299 #elif defined(OS_LINUX) && !defined(OS_CHROMEOS)
301 gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const { 300 gfx::ImageSkia* ChromeViewsDelegate::GetDefaultWindowIcon() const {
302 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 301 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
303 return rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_64); 302 return rb.GetImageSkiaNamed(IDR_PRODUCT_LOGO_64);
304 } 303 }
305 #endif 304 #endif
306 305
307 #if defined(USE_ASH) 306 #if defined(USE_ASH)
308 views::NonClientFrameView* ChromeViewsDelegate::CreateDefaultNonClientFrameView( 307 views::NonClientFrameView* ChromeViewsDelegate::CreateDefaultNonClientFrameView(
309 views::Widget* widget) { 308 views::Widget* widget) {
310 return chrome::IsNativeViewInAsh(widget->GetNativeView()) ? 309 return ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget);
311 ash::Shell::GetInstance()->CreateDefaultNonClientFrameView(widget) : NULL;
312 } 310 }
313 #endif 311 #endif
314 312
315 void ChromeViewsDelegate::AddRef() { 313 void ChromeViewsDelegate::AddRef() {
316 if (ref_count_ == 0u) { 314 if (ref_count_ == 0u) {
317 keep_alive_.reset( 315 keep_alive_.reset(
318 new ScopedKeepAlive(KeepAliveOrigin::CHROME_VIEWS_DELEGATE, 316 new ScopedKeepAlive(KeepAliveOrigin::CHROME_VIEWS_DELEGATE,
319 KeepAliveRestartOption::DISABLED)); 317 KeepAliveRestartOption::DISABLED));
320 } 318 }
321 319
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
499 return content::BrowserThread::GetBlockingPool(); 497 return content::BrowserThread::GetBlockingPool();
500 } 498 }
501 499
502 #if !defined(USE_ASH) 500 #if !defined(USE_ASH)
503 views::Widget::InitParams::WindowOpacity 501 views::Widget::InitParams::WindowOpacity
504 ChromeViewsDelegate::GetOpacityForInitParams( 502 ChromeViewsDelegate::GetOpacityForInitParams(
505 const views::Widget::InitParams& params) { 503 const views::Widget::InitParams& params) {
506 return views::Widget::InitParams::OPAQUE_WINDOW; 504 return views::Widget::InitParams::OPAQUE_WINDOW;
507 } 505 }
508 #endif 506 #endif
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/system_tray_delegate_common.cc ('k') | chrome/browser/ui/views/chrome_views_delegate_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698