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

Side by Side Diff: ui/native_theme/native_theme.cc

Issue 1825273002: Add more out of line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 | « ui/native_theme/native_theme.h ('k') | ui/platform_window/text_input_state.h » ('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 "ui/native_theme/native_theme.h" 5 #include "ui/native_theme/native_theme.h"
6 6
7 #include <cstring> 7 #include <cstring>
8 8
9 #include "ui/native_theme/native_theme_observer.h" 9 #include "ui/native_theme/native_theme_observer.h"
10 10
11 namespace ui { 11 namespace ui {
12 12
13 NativeTheme::ExtraParams::ExtraParams() { 13 NativeTheme::ExtraParams::ExtraParams() {
14 memset(this, 0, sizeof(*this)); 14 memset(this, 0, sizeof(*this));
15 } 15 }
16 16
17 NativeTheme::ExtraParams::ExtraParams(const ExtraParams& other) {
18 if (this != &other)
19 memcpy(this, &other, sizeof(*this));
vmpstr 2016/03/23 01:09:07 This seems to be on par with what the default ctor
20 }
21
17 void NativeTheme::SetScrollbarColors(unsigned inactive_color, 22 void NativeTheme::SetScrollbarColors(unsigned inactive_color,
18 unsigned active_color, 23 unsigned active_color,
19 unsigned track_color) { 24 unsigned track_color) {
20 thumb_inactive_color_ = inactive_color; 25 thumb_inactive_color_ = inactive_color;
21 thumb_active_color_ = active_color; 26 thumb_active_color_ = active_color;
22 track_color_ = track_color; 27 track_color_ = track_color;
23 } 28 }
24 29
25 void NativeTheme::AddObserver(NativeThemeObserver* observer) { 30 void NativeTheme::AddObserver(NativeThemeObserver* observer) {
26 native_theme_observers_.AddObserver(observer); 31 native_theme_observers_.AddObserver(observer);
(...skipping 10 matching lines...) Expand all
37 42
38 NativeTheme::NativeTheme() 43 NativeTheme::NativeTheme()
39 : thumb_inactive_color_(0xeaeaea), 44 : thumb_inactive_color_(0xeaeaea),
40 thumb_active_color_(0xf4f4f4), 45 thumb_active_color_(0xf4f4f4),
41 track_color_(0xd3d3d3) { 46 track_color_(0xd3d3d3) {
42 } 47 }
43 48
44 NativeTheme::~NativeTheme() {} 49 NativeTheme::~NativeTheme() {}
45 50
46 } // namespace ui 51 } // namespace ui
OLDNEW
« no previous file with comments | « ui/native_theme/native_theme.h ('k') | ui/platform_window/text_input_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698