OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/ui/panels/panel.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/extensions/extension_prefs.h" | 8 #include "chrome/browser/extensions/extension_prefs.h" |
9 #include "chrome/browser/extensions/extension_service.h" | 9 #include "chrome/browser/extensions/extension_service.h" |
10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
80 | 80 |
81 void Panel::SetBounds(const gfx::Rect& bounds) { | 81 void Panel::SetBounds(const gfx::Rect& bounds) { |
82 // Ignore any SetBounds requests since the bounds are completely controlled | 82 // Ignore any SetBounds requests since the bounds are completely controlled |
83 // by panel manager. | 83 // by panel manager. |
84 } | 84 } |
85 | 85 |
86 // Close() may be called multiple times if the browser window is not ready to | 86 // Close() may be called multiple times if the browser window is not ready to |
87 // close on the first attempt. | 87 // close on the first attempt. |
88 void Panel::Close() { | 88 void Panel::Close() { |
89 native_panel_->ClosePanel(); | 89 native_panel_->ClosePanel(); |
90 | |
91 // TODO(dimich): we need to only remove the panel when and if it actually | |
jennb
2011/08/19 21:46:12
Even if the panel isn't closing immediately, can't
Dmitry Titov
2011/08/22 18:34:56
See comment at the top.
| |
92 // closes. It is now only implemented on Mac (unless it's synchronous on other | |
93 // platforms). | |
94 #if !defined(OS_MACOSX) | |
90 manager()->Remove(this); | 95 manager()->Remove(this); |
96 #endif | |
91 } | 97 } |
92 | 98 |
93 void Panel::Activate() { | 99 void Panel::Activate() { |
94 native_panel_->ActivatePanel(); | 100 native_panel_->ActivatePanel(); |
95 } | 101 } |
96 | 102 |
97 void Panel::Deactivate() { | 103 void Panel::Deactivate() { |
98 native_panel_->DeactivatePanel(); | 104 native_panel_->DeactivatePanel(); |
99 } | 105 } |
100 | 106 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
428 } | 434 } |
429 #endif | 435 #endif |
430 | 436 |
431 Browser* Panel::browser() const { | 437 Browser* Panel::browser() const { |
432 return native_panel_->GetPanelBrowser(); | 438 return native_panel_->GetPanelBrowser(); |
433 } | 439 } |
434 | 440 |
435 void Panel::DestroyBrowser() { | 441 void Panel::DestroyBrowser() { |
436 native_panel_->DestroyPanelBrowser(); | 442 native_panel_->DestroyPanelBrowser(); |
437 } | 443 } |
OLD | NEW |