| 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/values.h" | 8 #include "base/values.h" |
| 9 #include "chrome/browser/sessions/session_tab_helper.h" | 9 #include "chrome/browser/sessions/session_tab_helper.h" |
| 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" | 10 #include "components/keyed_service/content/browser_context_dependency_manager.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 106 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 107 registry_->DispatchStatusChangeEvent(this); | 107 registry_->DispatchStatusChangeEvent(this); |
| 108 } | 108 } |
| 109 | 109 |
| 110 void DidDestroyFullscreenWidget(int routing_id) override { | 110 void DidDestroyFullscreenWidget(int routing_id) override { |
| 111 is_fullscreened_ = false; | 111 is_fullscreened_ = false; |
| 112 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 112 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 113 registry_->DispatchStatusChangeEvent(this); | 113 registry_->DispatchStatusChangeEvent(this); |
| 114 } | 114 } |
| 115 | 115 |
| 116 void DidToggleFullscreenModeForTab(bool entered_fullscreen) override { | 116 void DidToggleFullscreenModeForTab(bool entered_fullscreen, |
| 117 bool will_cause_resize) override { |
| 117 is_fullscreened_ = entered_fullscreen; | 118 is_fullscreened_ = entered_fullscreen; |
| 118 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) | 119 if (capture_state_ == tab_capture::TAB_CAPTURE_STATE_ACTIVE) |
| 119 registry_->DispatchStatusChangeEvent(this); | 120 registry_->DispatchStatusChangeEvent(this); |
| 120 } | 121 } |
| 121 | 122 |
| 122 void WebContentsDestroyed() override { | 123 void WebContentsDestroyed() override { |
| 123 registry_->KillRequest(this); // Deletes |this|. | 124 registry_->KillRequest(this); // Deletes |this|. |
| 124 } | 125 } |
| 125 | 126 |
| 126 private: | 127 private: |
| (...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 it != requests_.end(); ++it) { | 361 it != requests_.end(); ++it) { |
| 361 if ((*it) == request) { | 362 if ((*it) == request) { |
| 362 requests_.erase(it); | 363 requests_.erase(it); |
| 363 return; | 364 return; |
| 364 } | 365 } |
| 365 } | 366 } |
| 366 NOTREACHED(); | 367 NOTREACHED(); |
| 367 } | 368 } |
| 368 | 369 |
| 369 } // namespace extensions | 370 } // namespace extensions |
| OLD | NEW |