Refactoring: use C++11 class member variable initialization
This commit is contained in:
parent
ee57c95aa6
commit
2337237d58
94 changed files with 218 additions and 377 deletions
|
@ -25,12 +25,7 @@ void AutofillPopupChildView::GetAccessibleNodeData(ui::AXNodeData* node_data) {
|
|||
|
||||
AutofillPopupView::AutofillPopupView(AutofillPopup* popup,
|
||||
views::Widget* parent_widget)
|
||||
: popup_(popup),
|
||||
parent_widget_(parent_widget),
|
||||
#if defined(ENABLE_OSR)
|
||||
view_proxy_(nullptr),
|
||||
#endif
|
||||
weak_ptr_factory_(this) {
|
||||
: popup_(popup), parent_widget_(parent_widget), weak_ptr_factory_(this) {
|
||||
CreateChildViews();
|
||||
SetFocusBehavior(FocusBehavior::ALWAYS);
|
||||
set_drag_controller(this);
|
||||
|
|
|
@ -22,7 +22,7 @@ const int kResizeAreaCornerSize = 16;
|
|||
// static
|
||||
const char FramelessView::kViewClassName[] = "FramelessView";
|
||||
|
||||
FramelessView::FramelessView() : window_(NULL), frame_(NULL) {}
|
||||
FramelessView::FramelessView() {}
|
||||
|
||||
FramelessView::~FramelessView() {}
|
||||
|
||||
|
|
|
@ -45,8 +45,8 @@ class FramelessView : public views::NonClientFrameView {
|
|||
const char* GetClassName() const override;
|
||||
|
||||
// Not owned.
|
||||
NativeWindowViews* window_;
|
||||
views::Widget* frame_;
|
||||
NativeWindowViews* window_ = nullptr;
|
||||
views::Widget* frame_ = nullptr;
|
||||
|
||||
private:
|
||||
DISALLOW_COPY_AND_ASSIGN(FramelessView);
|
||||
|
|
|
@ -181,8 +181,7 @@ std::string GetMenuModelStatus(AtomMenuModel* model) {
|
|||
|
||||
GlobalMenuBarX11::GlobalMenuBarX11(NativeWindowViews* window)
|
||||
: window_(window),
|
||||
xid_(window_->GetNativeWindow()->GetHost()->GetAcceleratedWidget()),
|
||||
server_(NULL) {
|
||||
xid_(window_->GetNativeWindow()->GetHost()->GetAcceleratedWidget()) {
|
||||
EnsureMethodsLoaded();
|
||||
if (server_new)
|
||||
InitServer(xid_);
|
||||
|
|
|
@ -71,7 +71,7 @@ class GlobalMenuBarX11 {
|
|||
NativeWindowViews* window_;
|
||||
gfx::AcceleratedWidget xid_;
|
||||
|
||||
DbusmenuServer* server_;
|
||||
DbusmenuServer* server_ = nullptr;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(GlobalMenuBarX11);
|
||||
};
|
||||
|
|
|
@ -26,7 +26,7 @@ const SkColor kDefaultColor = SkColorSetARGB(255, 233, 233, 233);
|
|||
const char MenuBar::kViewClassName[] = "ElectronMenuBar";
|
||||
|
||||
MenuBar::MenuBar(views::View* window)
|
||||
: background_color_(kDefaultColor), window_(window), menu_model_(NULL) {
|
||||
: background_color_(kDefaultColor), window_(window) {
|
||||
RefreshColorCache();
|
||||
UpdateViewColors();
|
||||
SetLayoutManager(new views::BoxLayout(views::BoxLayout::kHorizontal));
|
||||
|
|
|
@ -72,8 +72,8 @@ class MenuBar : public views::View,
|
|||
SkColor disabled_color_;
|
||||
#endif
|
||||
|
||||
views::View* window_;
|
||||
AtomMenuModel* menu_model_;
|
||||
views::View* window_ = nullptr;
|
||||
AtomMenuModel* menu_model_ = nullptr;
|
||||
|
||||
View* FindAccelChild(base::char16 key);
|
||||
|
||||
|
|
|
@ -22,13 +22,6 @@ SubmenuButton::SubmenuButton(const base::string16& title,
|
|||
: views::MenuButton(gfx::RemoveAcceleratorChar(title, '&', NULL, NULL),
|
||||
menu_button_listener,
|
||||
false),
|
||||
accelerator_(0),
|
||||
show_underline_(false),
|
||||
underline_start_(0),
|
||||
underline_end_(0),
|
||||
text_width_(0),
|
||||
text_height_(0),
|
||||
underline_color_(SK_ColorBLACK),
|
||||
background_color_(background_color) {
|
||||
#if defined(OS_LINUX)
|
||||
// Dont' use native style border.
|
||||
|
|
|
@ -39,15 +39,15 @@ class SubmenuButton : public views::MenuButton {
|
|||
int index,
|
||||
int* pos) const;
|
||||
|
||||
base::char16 accelerator_;
|
||||
base::char16 accelerator_ = 0;
|
||||
|
||||
bool show_underline_;
|
||||
bool show_underline_ = false;
|
||||
|
||||
int underline_start_;
|
||||
int underline_end_;
|
||||
int text_width_;
|
||||
int text_height_;
|
||||
SkColor underline_color_;
|
||||
int underline_start_ = 0;
|
||||
int underline_end_ = 0;
|
||||
int text_width_ = 0;
|
||||
int text_height_ = 0;
|
||||
SkColor underline_color_ = SK_ColorBLACK;
|
||||
SkColor background_color_;
|
||||
|
||||
DISALLOW_COPY_AND_ASSIGN(SubmenuButton);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue