| 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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 386 PaintDetachedBookmarkBar(canvas, bookmark_bar_view_); | 386 PaintDetachedBookmarkBar(canvas, bookmark_bar_view_); |
| 387 canvas->Restore(); | 387 canvas->Restore(); |
| 388 } | 388 } |
| 389 | 389 |
| 390 /////////////////////////////////////////////////////////////////////////////// | 390 /////////////////////////////////////////////////////////////////////////////// |
| 391 // BrowserView, public: | 391 // BrowserView, public: |
| 392 | 392 |
| 393 // static | 393 // static |
| 394 const char BrowserView::kViewClassName[] = "BrowserView"; | 394 const char BrowserView::kViewClassName[] = "BrowserView"; |
| 395 | 395 |
| 396 BrowserView::BrowserView() | 396 BrowserView::BrowserView() : views::ClientView(nullptr, nullptr) {} |
| 397 : views::ClientView(nullptr, nullptr), | |
| 398 frame_(nullptr), | |
| 399 top_container_(nullptr), | |
| 400 tabstrip_(nullptr), | |
| 401 toolbar_(nullptr), | |
| 402 find_bar_host_view_(nullptr), | |
| 403 infobar_container_(nullptr), | |
| 404 contents_web_view_(nullptr), | |
| 405 devtools_web_view_(nullptr), | |
| 406 contents_container_(nullptr), | |
| 407 initialized_(false), | |
| 408 handling_theme_changed_(false), | |
| 409 in_process_fullscreen_(false), | |
| 410 force_location_bar_focus_(false), | |
| 411 activate_modal_dialog_factory_(this) {} | |
| 412 | 397 |
| 413 BrowserView::~BrowserView() { | 398 BrowserView::~BrowserView() { |
| 414 // All the tabs should have been destroyed already. If we were closed by the | 399 // All the tabs should have been destroyed already. If we were closed by the |
| 415 // OS with some tabs than the NativeBrowserFrame should have destroyed them. | 400 // OS with some tabs than the NativeBrowserFrame should have destroyed them. |
| 416 DCHECK_EQ(0, browser_->tab_strip_model()->count()); | 401 DCHECK_EQ(0, browser_->tab_strip_model()->count()); |
| 417 | 402 |
| 418 // Stop the animation timer explicitly here to avoid running it in a nested | 403 // Stop the animation timer explicitly here to avoid running it in a nested |
| 419 // message loop, which may run by Browser destructor. | 404 // message loop, which may run by Browser destructor. |
| 420 loading_animation_timer_.Stop(); | 405 loading_animation_timer_.Stop(); |
| 421 | 406 |
| (...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2680 } | 2665 } |
| 2681 | 2666 |
| 2682 extensions::ActiveTabPermissionGranter* | 2667 extensions::ActiveTabPermissionGranter* |
| 2683 BrowserView::GetActiveTabPermissionGranter() { | 2668 BrowserView::GetActiveTabPermissionGranter() { |
| 2684 content::WebContents* web_contents = GetActiveWebContents(); | 2669 content::WebContents* web_contents = GetActiveWebContents(); |
| 2685 if (!web_contents) | 2670 if (!web_contents) |
| 2686 return nullptr; | 2671 return nullptr; |
| 2687 return extensions::TabHelper::FromWebContents(web_contents) | 2672 return extensions::TabHelper::FromWebContents(web_contents) |
| 2688 ->active_tab_permission_granter(); | 2673 ->active_tab_permission_granter(); |
| 2689 } | 2674 } |
| OLD | NEW |