| 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 "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" | 5 #include "chrome/browser/extensions/api/tab_capture/tab_capture_registry.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "base/lazy_instance.h" | 9 #include "base/lazy_instance.h" |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 109 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 110 registry_->DispatchStatusChangeEvent(this); | 110 registry_->DispatchStatusChangeEvent(this); |
| 111 } | 111 } |
| 112 | 112 |
| 113 void DidDestroyFullscreenWidget(int routing_id) override { | 113 void DidDestroyFullscreenWidget(int routing_id) override { |
| 114 is_fullscreened_ = false; | 114 is_fullscreened_ = false; |
| 115 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 115 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 116 registry_->DispatchStatusChangeEvent(this); | 116 registry_->DispatchStatusChangeEvent(this); |
| 117 } | 117 } |
| 118 | 118 |
| 119 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { | 119 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 120 bool will_cause_resize) override { |
| 120 is_fullscreened_ = entered_fullscreen; | 121 is_fullscreened_ = entered_fullscreen; |
| 121 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 122 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 122 registry_->DispatchStatusChangeEvent(this); | 123 registry_->DispatchStatusChangeEvent(this); |
| 123 } | 124 } |
| 124 | 125 |
| 125 void WebContentsDestroyed() override { | 126 void WebContentsDestroyed() override { |
| 126 registry_->KillRequest(this); // Deletes |this|. | 127 registry_->KillRequest(this); // Deletes |this|. |
| 127 } | 128 } |
| 128 | 129 |
| 129 private: | 130 private: |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 363 it != requests_.end(); ++it) { | 364 it != requests_.end(); ++it) { |
| 364 if ((*it) == request) { | 365 if ((*it) == request) { |
| 365 requests_.erase(it); | 366 requests_.erase(it); |
| 366 return; | 367 return; |
| 367 } | 368 } |
| 368 } | 369 } |
| 369 NOTREACHED(); | 370 NOTREACHED(); |
| 370 } | 371 } |
| 371 | 372 |
| 372 } // namespace extensions | 373 } // namespace extensions |
| OLD | NEW |