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

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

Issue 863033002: Delete athena/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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 | « athena/main/athena_views_delegate.h ('k') | athena/main/debug_accelerator_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "athena/main/athena_views_delegate.h"
6
7 #include "athena/main/athena_frame_view.h"
8 #include "athena/screen/public/screen_manager.h"
9 #include "ui/views/views_delegate.h"
10
11 namespace athena {
12
13 namespace {
14
15 class AthenaViewsDelegate: public views::ViewsDelegate {
16 public:
17 AthenaViewsDelegate() {
18 }
19
20 ~AthenaViewsDelegate() override {}
21
22 virtual void OnBeforeWidgetInit(
23 views::Widget::InitParams* params,
24 views::internal::NativeWidgetDelegate* delegate) override {
25 params->context = athena::ScreenManager::Get()->GetContext();
26 }
27
28 virtual views::NonClientFrameView* CreateDefaultNonClientFrameView(
29 views::Widget* widget) override {
30 return new AthenaFrameView(widget);
31 }
32
33 private:
34 DISALLOW_COPY_AND_ASSIGN(AthenaViewsDelegate);
35 };
36
37 } // namespace
38
39 void CreateAthenaViewsDelegate() {
40 views::ViewsDelegate::views_delegate = new AthenaViewsDelegate;
41 }
42
43 void ShutdownAthenaViewsDelegate() {
44 CHECK(views::ViewsDelegate::views_delegate);
45 delete views::ViewsDelegate::views_delegate;
46 views::ViewsDelegate::views_delegate = nullptr;
47 }
48
49 } // namespace athena
OLDNEW
« no previous file with comments | « athena/main/athena_views_delegate.h ('k') | athena/main/debug_accelerator_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698