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/window_type_launcher.h" | 5 #include "ash/shell/window_type_launcher.h" |
6 | 6 |
7 #include "ash/root_window_controller.h" | 7 #include "ash/root_window_controller.h" |
8 #include "ash/screensaver/screensaver_view.h" | 8 #include "ash/screensaver/screensaver_view.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 } | 153 } |
154 virtual bool CanResize() const OVERRIDE { | 154 virtual bool CanResize() const OVERRIDE { |
155 return true; | 155 return true; |
156 } | 156 } |
157 virtual string16 GetWindowTitle() const OVERRIDE { | 157 virtual string16 GetWindowTitle() const OVERRIDE { |
158 return ASCIIToUTF16("Non-Modal Transient"); | 158 return ASCIIToUTF16("Non-Modal Transient"); |
159 } | 159 } |
160 virtual void DeleteDelegate() OVERRIDE { | 160 virtual void DeleteDelegate() OVERRIDE { |
161 if (GetWidget() == non_modal_transient_) | 161 if (GetWidget() == non_modal_transient_) |
162 non_modal_transient_ = NULL; | 162 non_modal_transient_ = NULL; |
| 163 |
| 164 delete this; |
163 } | 165 } |
164 | 166 |
165 private: | 167 private: |
166 SkColor color_; | 168 SkColor color_; |
167 | 169 |
168 static views::Widget* non_modal_transient_; | 170 static views::Widget* non_modal_transient_; |
169 | 171 |
170 DISALLOW_COPY_AND_ASSIGN(NonModalTransient); | 172 DISALLOW_COPY_AND_ASSIGN(NonModalTransient); |
171 }; | 173 }; |
172 | 174 |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
387 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), | 389 if (menu_runner_->RunMenuAt(GetWidget(), NULL, gfx::Rect(point, gfx::Size()), |
388 MenuItemView::TOPLEFT, | 390 MenuItemView::TOPLEFT, |
389 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == | 391 MenuRunner::HAS_MNEMONICS | views::MenuRunner::CONTEXT_MENU) == |
390 MenuRunner::MENU_DELETED) | 392 MenuRunner::MENU_DELETED) |
391 return; | 393 return; |
392 } | 394 } |
393 #endif // !defined(OS_MACOSX) | 395 #endif // !defined(OS_MACOSX) |
394 | 396 |
395 } // namespace shell | 397 } // namespace shell |
396 } // namespace ash | 398 } // namespace ash |
OLD | NEW |