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

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

Issue 2438853002: Renames aura::client::WindowTreeClient to WindowParentingClient (Closed)
Patch Set: cleanup Created 4 years, 2 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/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 // users don't crash. Developers will hit the DCHECK and should provide a 420 // users don't crash. Developers will hit the DCHECK and should provide a
421 // context. 421 // context.
422 if (params->context) 422 if (params->context)
423 params->context = params->context->GetRootWindow(); 423 params->context = params->context->GetRootWindow();
424 DCHECK(params->parent || params->context || !params->child) 424 DCHECK(params->parent || params->context || !params->child)
425 << "Please provide a parent or context for this widget."; 425 << "Please provide a parent or context for this widget.";
426 if (!params->parent && !params->context) 426 if (!params->parent && !params->context)
427 params->context = ash::Shell::GetPrimaryRootWindow(); 427 params->context = ash::Shell::GetPrimaryRootWindow();
428 #elif defined(USE_AURA) 428 #elif defined(USE_AURA)
429 // While the majority of the time, context wasn't plumbed through due to the 429 // While the majority of the time, context wasn't plumbed through due to the
430 // existence of a global WindowTreeClient, if this window is toplevel, it's 430 // existence of a global WindowParentingClient, if this window is toplevel,
431 // possible that there is no contextual state that we can use. 431 // it's possible that there is no contextual state that we can use.
432 if (params->parent == NULL && params->context == NULL && !params->child) { 432 if (params->parent == NULL && params->context == NULL && !params->child) {
433 params->native_widget = new views::DesktopNativeWidgetAura(delegate); 433 params->native_widget = new views::DesktopNativeWidgetAura(delegate);
434 } else if (use_non_toplevel_window) { 434 } else if (use_non_toplevel_window) {
435 views::NativeWidgetAura* native_widget = 435 views::NativeWidgetAura* native_widget =
436 new views::NativeWidgetAura(delegate); 436 new views::NativeWidgetAura(delegate);
437 if (params->parent) { 437 if (params->parent) {
438 Profile* parent_profile = reinterpret_cast<Profile*>( 438 Profile* parent_profile = reinterpret_cast<Profile*>(
439 params->parent->GetNativeWindowProperty(Profile::kProfileKey)); 439 params->parent->GetNativeWindowProperty(Profile::kProfileKey));
440 native_widget->SetNativeWindowProperty(Profile::kProfileKey, 440 native_widget->SetNativeWindowProperty(Profile::kProfileKey,
441 parent_profile); 441 parent_profile);
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 return content::BrowserThread::GetBlockingPool(); 509 return content::BrowserThread::GetBlockingPool();
510 } 510 }
511 511
512 #if !defined(USE_ASH) 512 #if !defined(USE_ASH)
513 views::Widget::InitParams::WindowOpacity 513 views::Widget::InitParams::WindowOpacity
514 ChromeViewsDelegate::GetOpacityForInitParams( 514 ChromeViewsDelegate::GetOpacityForInitParams(
515 const views::Widget::InitParams& params) { 515 const views::Widget::InitParams& params) {
516 return views::Widget::InitParams::OPAQUE_WINDOW; 516 return views::Widget::InitParams::OPAQUE_WINDOW;
517 } 517 }
518 #endif 518 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698