| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/ui/views/frame/browser_view.h" | 5 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 476 browser_->tab_strip_model()->RemoveObserver(this); | 476 browser_->tab_strip_model()->RemoveObserver(this); |
| 477 | 477 |
| 478 #if defined(OS_WIN) | 478 #if defined(OS_WIN) |
| 479 // Terminate the jumplist (must be called before browser_->profile() is | 479 // Terminate the jumplist (must be called before browser_->profile() is |
| 480 // destroyed. | 480 // destroyed. |
| 481 if (jumplist_.get()) { | 481 if (jumplist_.get()) { |
| 482 jumplist_->Terminate(); | 482 jumplist_->Terminate(); |
| 483 } | 483 } |
| 484 #endif | 484 #endif |
| 485 | 485 |
| 486 extensions::ExtensionCommandsGlobalRegistry* global_registry = |
| 487 extensions::ExtensionCommandsGlobalRegistry::Get(browser_->profile()); |
| 488 if (global_registry->registry_for_active_window() == |
| 489 extension_keybinding_registry_.get()) |
| 490 global_registry->set_registry_for_active_window(nullptr); |
| 491 |
| 486 // We destroy the download shelf before |browser_| to remove its child | 492 // We destroy the download shelf before |browser_| to remove its child |
| 487 // download views from the set of download observers (since the observed | 493 // download views from the set of download observers (since the observed |
| 488 // downloads can be destroyed along with |browser_| and the observer | 494 // downloads can be destroyed along with |browser_| and the observer |
| 489 // notifications will call back into deleted objects). | 495 // notifications will call back into deleted objects). |
| 490 BrowserViewLayout* browser_view_layout = GetBrowserViewLayout(); | 496 BrowserViewLayout* browser_view_layout = GetBrowserViewLayout(); |
| 491 if (browser_view_layout) | 497 if (browser_view_layout) |
| 492 browser_view_layout->set_download_shelf(nullptr); | 498 browser_view_layout->set_download_shelf(nullptr); |
| 493 download_shelf_.reset(); | 499 download_shelf_.reset(); |
| 494 | 500 |
| 495 // The TabStrip attaches a listener to the model. Make sure we shut down the | 501 // The TabStrip attaches a listener to the model. Make sure we shut down the |
| (...skipping 2172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2668 } | 2674 } |
| 2669 | 2675 |
| 2670 extensions::ActiveTabPermissionGranter* | 2676 extensions::ActiveTabPermissionGranter* |
| 2671 BrowserView::GetActiveTabPermissionGranter() { | 2677 BrowserView::GetActiveTabPermissionGranter() { |
| 2672 content::WebContents* web_contents = GetActiveWebContents(); | 2678 content::WebContents* web_contents = GetActiveWebContents(); |
| 2673 if (!web_contents) | 2679 if (!web_contents) |
| 2674 return nullptr; | 2680 return nullptr; |
| 2675 return extensions::TabHelper::FromWebContents(web_contents) | 2681 return extensions::TabHelper::FromWebContents(web_contents) |
| 2676 ->active_tab_permission_granter(); | 2682 ->active_tab_permission_granter(); |
| 2677 } | 2683 } |
| OLD | NEW |