OLD | NEW |
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 "ash/shell/toplevel_window.h" | 5 #include "ash/shell/toplevel_window.h" |
6 | 6 |
7 #include "ash/common/wm/window_positioner.h" | 7 #include "ash/common/wm/window_positioner.h" |
8 #include "ash/common/wm/window_state.h" | 8 #include "ash/common/wm/window_state.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/wm/window_state_aura.h" | 10 #include "ash/wm/window_state_aura.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 widget->Show(); | 43 widget->Show(); |
44 return widget; | 44 return widget; |
45 } | 45 } |
46 | 46 |
47 // static | 47 // static |
48 void ToplevelWindow::ClearSavedStateForTest() { | 48 void ToplevelWindow::ClearSavedStateForTest() { |
49 delete saved_state; | 49 delete saved_state; |
50 saved_state = NULL; | 50 saved_state = NULL; |
51 } | 51 } |
52 | 52 |
53 ToplevelWindow::ToplevelWindow(const CreateParams& params) : params_(params) { | 53 ToplevelWindow::ToplevelWindow(const CreateParams& params) : params_(params) {} |
54 } | |
55 | 54 |
56 ToplevelWindow::~ToplevelWindow() { | 55 ToplevelWindow::~ToplevelWindow() {} |
57 } | |
58 | 56 |
59 void ToplevelWindow::OnPaint(gfx::Canvas* canvas) { | 57 void ToplevelWindow::OnPaint(gfx::Canvas* canvas) { |
60 canvas->FillRect(GetLocalBounds(), SK_ColorDKGRAY); | 58 canvas->FillRect(GetLocalBounds(), SK_ColorDKGRAY); |
61 } | 59 } |
62 | 60 |
63 base::string16 ToplevelWindow::GetWindowTitle() const { | 61 base::string16 ToplevelWindow::GetWindowTitle() const { |
64 return base::ASCIIToUTF16("Examples: Toplevel Window"); | 62 return base::ASCIIToUTF16("Examples: Toplevel Window"); |
65 } | 63 } |
66 | 64 |
67 void ToplevelWindow::SaveWindowPlacement(const gfx::Rect& bounds, | 65 void ToplevelWindow::SaveWindowPlacement(const gfx::Rect& bounds, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 bool ToplevelWindow::CanMaximize() const { | 98 bool ToplevelWindow::CanMaximize() const { |
101 return params_.can_maximize; | 99 return params_.can_maximize; |
102 } | 100 } |
103 | 101 |
104 bool ToplevelWindow::CanMinimize() const { | 102 bool ToplevelWindow::CanMinimize() const { |
105 return params_.can_maximize; | 103 return params_.can_maximize; |
106 } | 104 } |
107 | 105 |
108 } // namespace shell | 106 } // namespace shell |
109 } // namespace ash | 107 } // namespace ash |
OLD | NEW |