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

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

Issue 1686153003: Adds calls to NativeWidgetFactory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | ui/app_list/views/app_list_view.cc » ('j') | 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/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/strings/string_util.h" 8 #include "base/strings/string_util.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/time/time.h" 10 #include "base/time/time.h"
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
316 views::internal::NativeWidgetDelegate* delegate) { 316 views::internal::NativeWidgetDelegate* delegate) {
317 // We need to determine opacity if it's not already specified. 317 // We need to determine opacity if it's not already specified.
318 if (params->opacity == views::Widget::InitParams::INFER_OPACITY) 318 if (params->opacity == views::Widget::InitParams::INFER_OPACITY)
319 params->opacity = GetOpacityForInitParams(*params); 319 params->opacity = GetOpacityForInitParams(*params);
320 320
321 // If we already have a native_widget, we don't have to try to come 321 // If we already have a native_widget, we don't have to try to come
322 // up with one. 322 // up with one.
323 if (params->native_widget) 323 if (params->native_widget)
324 return; 324 return;
325 325
326 if (!native_widget_factory().is_null()) {
327 params->native_widget = native_widget_factory().Run(*params, delegate);
328 if (params->native_widget)
329 return;
330 }
331
326 #if defined(USE_AURA) && !defined(OS_CHROMEOS) 332 #if defined(USE_AURA) && !defined(OS_CHROMEOS)
327 bool use_non_toplevel_window = 333 bool use_non_toplevel_window =
328 params->parent && 334 params->parent &&
329 #if defined(OS_WIN) 335 #if defined(OS_WIN)
330 // Check the force_software_compositing flag only on Windows. If this 336 // Check the force_software_compositing flag only on Windows. If this
331 // flag is on, it means that the widget being created wants to use the 337 // flag is on, it means that the widget being created wants to use the
332 // software compositor which requires a top level window. We cannot have 338 // software compositor which requires a top level window. We cannot have
333 // a mixture of compositors active in one view hierarchy. 339 // a mixture of compositors active in one view hierarchy.
334 !params->force_software_compositing && 340 !params->force_software_compositing &&
335 #else 341 #else
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
502 return content::BrowserThread::GetBlockingPool(); 508 return content::BrowserThread::GetBlockingPool();
503 } 509 }
504 510
505 #if !defined(USE_ASH) 511 #if !defined(USE_ASH)
506 views::Widget::InitParams::WindowOpacity 512 views::Widget::InitParams::WindowOpacity
507 ChromeViewsDelegate::GetOpacityForInitParams( 513 ChromeViewsDelegate::GetOpacityForInitParams(
508 const views::Widget::InitParams& params) { 514 const views::Widget::InitParams& params) {
509 return views::Widget::InitParams::OPAQUE_WINDOW; 515 return views::Widget::InitParams::OPAQUE_WINDOW;
510 } 516 }
511 #endif 517 #endif
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/app_list_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698