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/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 2637 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2648 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); | 2648 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); |
2649 } | 2649 } |
2650 | 2650 |
2651 bool Browser::ShouldHideUIForFullscreen() const { | 2651 bool Browser::ShouldHideUIForFullscreen() const { |
2652 // Windows and GTK remove the top controls in fullscreen, but Mac and Ash | 2652 // Windows and GTK remove the top controls in fullscreen, but Mac and Ash |
2653 // keep the controls in a slide-down panel. | 2653 // keep the controls in a slide-down panel. |
2654 return window_ && window_->ShouldHideUIForFullscreen(); | 2654 return window_ && window_->ShouldHideUIForFullscreen(); |
2655 } | 2655 } |
2656 | 2656 |
2657 bool Browser::ShouldStartShutdown() const { | 2657 bool Browser::ShouldStartShutdown() const { |
2658 return BrowserList::GetInstance(host_desktop_type())->size() <= 1; | 2658 return BrowserList::GetInstance()->size() <= 1; |
2659 } | 2659 } |
2660 | 2660 |
2661 bool Browser::MaybeCreateBackgroundContents( | 2661 bool Browser::MaybeCreateBackgroundContents( |
2662 int32_t route_id, | 2662 int32_t route_id, |
2663 int32_t main_frame_route_id, | 2663 int32_t main_frame_route_id, |
2664 int32_t main_frame_widget_route_id, | 2664 int32_t main_frame_widget_route_id, |
2665 WebContents* opener_web_contents, | 2665 WebContents* opener_web_contents, |
2666 const std::string& frame_name, | 2666 const std::string& frame_name, |
2667 const GURL& target_url, | 2667 const GURL& target_url, |
2668 const std::string& partition_id, | 2668 const std::string& partition_id, |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2735 if (contents && !allow_js_access) { | 2735 if (contents && !allow_js_access) { |
2736 contents->web_contents()->GetController().LoadURL( | 2736 contents->web_contents()->GetController().LoadURL( |
2737 target_url, | 2737 target_url, |
2738 content::Referrer(), | 2738 content::Referrer(), |
2739 ui::PAGE_TRANSITION_LINK, | 2739 ui::PAGE_TRANSITION_LINK, |
2740 std::string()); // No extra headers. | 2740 std::string()); // No extra headers. |
2741 } | 2741 } |
2742 | 2742 |
2743 return contents != NULL; | 2743 return contents != NULL; |
2744 } | 2744 } |
OLD | NEW |