| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/permissions/permission_request_manager.h" | 5 #include "chrome/browser/permissions/permission_request_manager.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/feature_list.h" | 10 #include "base/feature_list.h" |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 264 gfx::NativeWindow PermissionRequestManager::GetBubbleWindow() { | 264 gfx::NativeWindow PermissionRequestManager::GetBubbleWindow() { |
| 265 if (view_) | 265 if (view_) |
| 266 return view_->GetNativeWindow(); | 266 return view_->GetNativeWindow(); |
| 267 return nullptr; | 267 return nullptr; |
| 268 } | 268 } |
| 269 | 269 |
| 270 void PermissionRequestManager::DidFinishNavigation( | 270 void PermissionRequestManager::DidFinishNavigation( |
| 271 content::NavigationHandle* navigation_handle) { | 271 content::NavigationHandle* navigation_handle) { |
| 272 if (!navigation_handle->IsInMainFrame() || | 272 if (!navigation_handle->IsInMainFrame() || |
| 273 !navigation_handle->HasCommitted() || | 273 !navigation_handle->HasCommitted() || |
| 274 navigation_handle->IsSamePage()) { | 274 navigation_handle->IsSameDocument()) { |
| 275 return; | 275 return; |
| 276 } | 276 } |
| 277 | 277 |
| 278 CancelPendingQueues(); | 278 CancelPendingQueues(); |
| 279 FinalizeBubble(); | 279 FinalizeBubble(); |
| 280 main_frame_has_fully_loaded_ = false; | 280 main_frame_has_fully_loaded_ = false; |
| 281 } | 281 } |
| 282 | 282 |
| 283 void PermissionRequestManager::DocumentOnLoadCompletedInMainFrame() { | 283 void PermissionRequestManager::DocumentOnLoadCompletedInMainFrame() { |
| 284 main_frame_has_fully_loaded_ = true; | 284 main_frame_has_fully_loaded_ = true; |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 521 case DENY_ALL: | 521 case DENY_ALL: |
| 522 Deny(); | 522 Deny(); |
| 523 break; | 523 break; |
| 524 case DISMISS: | 524 case DISMISS: |
| 525 Closing(); | 525 Closing(); |
| 526 break; | 526 break; |
| 527 case NONE: | 527 case NONE: |
| 528 NOTREACHED(); | 528 NOTREACHED(); |
| 529 } | 529 } |
| 530 } | 530 } |
| OLD | NEW |