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

Unified Diff: ui/views/widget/widget.cc

Issue 1438513003: [MD] Implement incognito colors as a NativeTheme (for Aura). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: init param, pkasting feedback Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.cc
diff --git a/ui/views/widget/widget.cc b/ui/views/widget/widget.cc
index c3c0252a7f91fe0a645dfa7be4deed08055e4bd7..5ee2b5f8eb8759c03366e435f7ab45829ef0bfbc 100644
--- a/ui/views/widget/widget.cc
+++ b/ui/views/widget/widget.cc
@@ -111,7 +111,7 @@ class DefaultWidgetDelegate : public WidgetDelegate {
Widget::InitParams::InitParams()
: type(TYPE_WINDOW),
- delegate(NULL),
+ delegate(nullptr),
child(false),
opacity(INFER_OPACITY),
accept_events(true),
@@ -124,18 +124,19 @@ Widget::InitParams::InitParams()
remove_standard_frame(false),
use_system_default_icon(false),
show_state(ui::SHOW_STATE_DEFAULT),
- parent(NULL),
- native_widget(NULL),
- desktop_window_tree_host(NULL),
+ parent(nullptr),
+ native_widget(nullptr),
+ native_theme(nullptr),
+ desktop_window_tree_host(nullptr),
layer_type(ui::LAYER_TEXTURED),
- context(NULL),
+ context(nullptr),
force_show_in_taskbar(false),
force_software_compositing(false) {
}
Widget::InitParams::InitParams(Type type)
: type(type),
- delegate(NULL),
+ delegate(nullptr),
child(false),
opacity(INFER_OPACITY),
accept_events(true),
@@ -148,11 +149,12 @@ Widget::InitParams::InitParams(Type type)
remove_standard_frame(false),
use_system_default_icon(false),
show_state(ui::SHOW_STATE_DEFAULT),
- parent(NULL),
- native_widget(NULL),
- desktop_window_tree_host(NULL),
+ parent(nullptr),
+ native_widget(nullptr),
+ native_theme(nullptr),
+ desktop_window_tree_host(nullptr),
layer_type(ui::LAYER_TEXTURED),
- context(NULL),
+ context(nullptr),
force_show_in_taskbar(false),
force_software_compositing(false) {
}
@@ -164,10 +166,11 @@ Widget::InitParams::~InitParams() {
// Widget, public:
Widget::Widget()
- : native_widget_(NULL),
- widget_delegate_(NULL),
- non_client_view_(NULL),
- dragged_view_(NULL),
+ : native_widget_(nullptr),
+ native_theme_(nullptr),
+ widget_delegate_(nullptr),
+ non_client_view_(nullptr),
+ dragged_view_(nullptr),
ownership_(InitParams::NATIVE_WIDGET_OWNS_WIDGET),
is_secondary_widget_(true),
frame_type_(FRAME_TYPE_DEFAULT),
@@ -365,6 +368,7 @@ void Widget::Init(const InitParams& in_params) {
internal::NativeWidgetPrivate::IsMouseButtonDown();
}
native_widget_->InitNativeWidget(params);
+ native_theme_ = params.native_theme;
if (RequiresNonClientView(params.type)) {
non_client_view_ = new NonClientView;
non_client_view_->SetFrameView(CreateNonClientFrameView());
@@ -766,7 +770,7 @@ ui::ThemeProvider* Widget::GetThemeProvider() const {
}
const ui::NativeTheme* Widget::GetNativeTheme() const {
- return native_widget_->GetNativeTheme();
+ return native_theme_? native_theme_ : native_widget_->GetNativeTheme();
}
FocusManager* Widget::GetFocusManager() {
« no previous file with comments | « ui/views/widget/widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698