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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
85 | 85 |
86 void Panel::SetBounds(const gfx::Rect& bounds) { | 86 void Panel::SetBounds(const gfx::Rect& bounds) { |
87 // Ignore any SetBounds requests since the bounds are completely controlled | 87 // Ignore any SetBounds requests since the bounds are completely controlled |
88 // by panel manager. | 88 // by panel manager. |
89 } | 89 } |
90 | 90 |
91 // Close() may be called multiple times if the browser window is not ready to | 91 // Close() may be called multiple times if the browser window is not ready to |
92 // close on the first attempt. | 92 // close on the first attempt. |
93 void Panel::Close() { | 93 void Panel::Close() { |
94 native_panel_->ClosePanel(); | 94 native_panel_->ClosePanel(); |
95 | |
96 // TODO(dimich): we need to only remove the panel when and if it actually | |
97 // closes. It is now only implemented on Mac (unless it's synchronous on other | |
jennb
2011/08/22 19:13:02
Change the 2nd sentence to state that changes are
| |
98 // platforms). | |
99 #if !defined(OS_MACOSX) | |
95 manager()->Remove(this); | 100 manager()->Remove(this); |
101 #endif | |
96 } | 102 } |
97 | 103 |
98 void Panel::Activate() { | 104 void Panel::Activate() { |
99 native_panel_->ActivatePanel(); | 105 native_panel_->ActivatePanel(); |
100 } | 106 } |
101 | 107 |
102 void Panel::Deactivate() { | 108 void Panel::Deactivate() { |
103 native_panel_->DeactivatePanel(); | 109 native_panel_->DeactivatePanel(); |
104 } | 110 } |
105 | 111 |
(...skipping 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
433 } | 439 } |
434 #endif | 440 #endif |
435 | 441 |
436 Browser* Panel::browser() const { | 442 Browser* Panel::browser() const { |
437 return native_panel_->GetPanelBrowser(); | 443 return native_panel_->GetPanelBrowser(); |
438 } | 444 } |
439 | 445 |
440 void Panel::DestroyBrowser() { | 446 void Panel::DestroyBrowser() { |
441 native_panel_->DestroyPanelBrowser(); | 447 native_panel_->DestroyPanelBrowser(); |
442 } | 448 } |
OLD | NEW |