OLD | NEW |
---|---|
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/chromeos/frame/panel_controller.h" | 5 #include "chrome/browser/chromeos/frame/panel_controller.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "app/resource_bundle.h" | 9 #include "app/resource_bundle.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
299 title_window_ = NULL; | 299 title_window_ = NULL; |
300 title_ = NULL; | 300 title_ = NULL; |
301 title_content_->OnClose(); | 301 title_content_->OnClose(); |
302 title_content_ = NULL; | 302 title_content_ = NULL; |
303 } | 303 } |
304 } | 304 } |
305 | 305 |
306 void PanelController::OnCloseButtonPressed() { | 306 void PanelController::OnCloseButtonPressed() { |
307 DCHECK(title_content_); | 307 DCHECK(title_content_); |
308 if (title_window_) { | 308 if (title_window_) { |
309 if (delegate_) | 309 if (delegate_) { |
310 if (!delegate_->CanClosePanel()) | |
oshima
2011/01/13 21:18:12
This may not be the scope of this CL, but wouldn't
Daniel Erat
2011/01/13 21:26:34
In the case of a beforeunload handler, a modal dia
| |
311 return; | |
310 delegate_->ClosePanel(); | 312 delegate_->ClosePanel(); |
313 } | |
311 Close(); | 314 Close(); |
312 } | 315 } |
313 } | 316 } |
314 | 317 |
315 PanelController::TitleContentView::TitleContentView( | 318 PanelController::TitleContentView::TitleContentView( |
316 PanelController* panel_controller) | 319 PanelController* panel_controller) |
317 : panel_controller_(panel_controller) { | 320 : panel_controller_(panel_controller) { |
318 VLOG(1) << "panel: c " << this; | 321 VLOG(1) << "panel: c " << this; |
319 InitializeResources(); | 322 InitializeResources(); |
320 close_button_ = new views::ImageButton(this); | 323 close_button_ = new views::ImageButton(this); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
398 views::Button* sender, const views::Event& event) { | 401 views::Button* sender, const views::Event& event) { |
399 if (panel_controller_ && sender == close_button_) | 402 if (panel_controller_ && sender == close_button_) |
400 panel_controller_->OnCloseButtonPressed(); | 403 panel_controller_->OnCloseButtonPressed(); |
401 } | 404 } |
402 | 405 |
403 PanelController::TitleContentView::~TitleContentView() { | 406 PanelController::TitleContentView::~TitleContentView() { |
404 VLOG(1) << "panel: delete " << this; | 407 VLOG(1) << "panel: delete " << this; |
405 } | 408 } |
406 | 409 |
407 } // namespace chromeos | 410 } // namespace chromeos |
OLD | NEW |