| 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/views/extensions/extension_popup.h" | 5 #include "chrome/browser/ui/views/extensions/extension_popup.h" |
| 6 | 6 |
| 7 #include <vector> | 7 #include <vector> |
| 8 | 8 |
| 9 #include "chrome/browser/debugger/devtools_manager.h" | 9 #include "chrome/browser/debugger/devtools_manager.h" |
| 10 #include "chrome/browser/debugger/devtools_toggle_action.h" | 10 #include "chrome/browser/debugger/devtools_toggle_action.h" |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 | 70 |
| 71 // Listen for the containing view calling window.close(); | 71 // Listen for the containing view calling window.close(); |
| 72 registrar_.Add(this, NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, | 72 registrar_.Add(this, NotificationType::EXTENSION_HOST_VIEW_SHOULD_CLOSE, |
| 73 Source<Profile>(host->profile())); | 73 Source<Profile>(host->profile())); |
| 74 } | 74 } |
| 75 | 75 |
| 76 ExtensionPopup::~ExtensionPopup() { | 76 ExtensionPopup::~ExtensionPopup() { |
| 77 } | 77 } |
| 78 | 78 |
| 79 void ExtensionPopup::Show(bool activate) { | 79 void ExtensionPopup::Show(bool activate) { |
| 80 if (visible()) | 80 if (popup_->IsVisible()) |
| 81 return; | 81 return; |
| 82 | 82 |
| 83 #if defined(OS_WIN) | 83 #if defined(OS_WIN) |
| 84 frame_->GetWindow()->DisableInactiveRendering(); | 84 frame_->GetContainingWindow()->DisableInactiveRendering(); |
| 85 #endif | 85 #endif |
| 86 | 86 |
| 87 ResizeToView(); | 87 ResizeToView(); |
| 88 BrowserBubble::Show(activate); | 88 BrowserBubble::Show(activate); |
| 89 } | 89 } |
| 90 | 90 |
| 91 void ExtensionPopup::BubbleBrowserWindowMoved(BrowserBubble* bubble) { | 91 void ExtensionPopup::BubbleBrowserWindowMoved(BrowserBubble* bubble) { |
| 92 ResizeToView(); | 92 ResizeToView(); |
| 93 } | 93 } |
| 94 | 94 |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 209 if (closing_) | 209 if (closing_) |
| 210 return; | 210 return; |
| 211 closing_ = true; | 211 closing_ = true; |
| 212 DetachFromBrowser(); | 212 DetachFromBrowser(); |
| 213 | 213 |
| 214 if (observer_) | 214 if (observer_) |
| 215 observer_->ExtensionPopupIsClosing(this); | 215 observer_->ExtensionPopupIsClosing(this); |
| 216 | 216 |
| 217 Release(); // Balanced in ctor. | 217 Release(); // Balanced in ctor. |
| 218 } | 218 } |
| OLD | NEW |