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

Side by Side Diff: athena/main/athena_views_delegate.cc

Issue 641683003: C++11 override style change for athena (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "athena/main/athena_views_delegate.h" 5 #include "athena/main/athena_views_delegate.h"
6 6
7 #include "athena/main/athena_frame_view.h" 7 #include "athena/main/athena_frame_view.h"
8 #include "athena/screen/public/screen_manager.h" 8 #include "athena/screen/public/screen_manager.h"
9 #include "ui/views/views_delegate.h" 9 #include "ui/views/views_delegate.h"
10 10
11 namespace athena { 11 namespace athena {
12 12
13 namespace { 13 namespace {
14 14
15 class AthenaViewsDelegate: public views::ViewsDelegate { 15 class AthenaViewsDelegate: public views::ViewsDelegate {
16 public: 16 public:
17 AthenaViewsDelegate() { 17 AthenaViewsDelegate() {
18 } 18 }
19 19
20 virtual ~AthenaViewsDelegate() { 20 ~AthenaViewsDelegate() override {}
21 }
22 21
23 virtual void OnBeforeWidgetInit( 22 virtual void OnBeforeWidgetInit(
24 views::Widget::InitParams* params, 23 views::Widget::InitParams* params,
25 views::internal::NativeWidgetDelegate* delegate) override { 24 views::internal::NativeWidgetDelegate* delegate) override {
26 params->context = athena::ScreenManager::Get()->GetContext(); 25 params->context = athena::ScreenManager::Get()->GetContext();
27 } 26 }
28 27
29 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView( 28 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
30 views::Widget* widget) override { 29 views::Widget* widget) override {
31 return new AthenaFrameView(widget); 30 return new AthenaFrameView(widget);
32 } 31 }
33 32
34 private: 33 private:
35 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate); 34 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
36 }; 35 };
37 36
38 } // namespace 37 } // namespace
39 38
40 void CreateAthenaViewsDelegate() { 39 void CreateAthenaViewsDelegate() {
41 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate; 40 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate;
42 } 41 }
43 42
44 void ShutdownAthenaViewsDelegate() { 43 void ShutdownAthenaViewsDelegate() {
45 CHECK(views::ViewsDelegate::views_delegate); 44 CHECK(views::ViewsDelegate::views_delegate);
46 delete views::ViewsDelegate::views_delegate; 45 delete views::ViewsDelegate::views_delegate;
47 views::ViewsDelegate::views_delegate = nullptr; 46 views::ViewsDelegate::views_delegate = nullptr;
48 } 47 }
49 48
50 } // namespace athena 49 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/athena_renderer_pdf_helper.cc ('k') | athena/resource_manager/delegate/resource_manager_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698