| 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 2496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2507 BookmarkBar::ANIMATE_STATE_CHANGE : | 2507 BookmarkBar::ANIMATE_STATE_CHANGE : |
| 2508 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); | 2508 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); |
| 2509 } | 2509 } |
| 2510 | 2510 |
| 2511 bool Browser::ShouldHideUIForFullscreen() const { | 2511 bool Browser::ShouldHideUIForFullscreen() const { |
| 2512 // Windows and GTK remove the browser controls in fullscreen, but Mac and Ash | 2512 // Windows and GTK remove the browser controls in fullscreen, but Mac and Ash |
| 2513 // keep the controls in a slide-down panel. | 2513 // keep the controls in a slide-down panel. |
| 2514 return window_ && window_->ShouldHideUIForFullscreen(); | 2514 return window_ && window_->ShouldHideUIForFullscreen(); |
| 2515 } | 2515 } |
| 2516 | 2516 |
| 2517 ::rappor::RapporService* Browser::getRapporService() { |
| 2518 if (g_browser_process->IsShuttingDown()) |
| 2519 return nullptr; |
| 2520 return g_browser_process->rappor_service(); |
| 2521 } |
| 2522 |
| 2517 bool Browser::ShouldStartShutdown() const { | 2523 bool Browser::ShouldStartShutdown() const { |
| 2518 return BrowserList::GetInstance()->size() <= 1; | 2524 return BrowserList::GetInstance()->size() <= 1; |
| 2519 } | 2525 } |
| 2520 | 2526 |
| 2521 bool Browser::MaybeCreateBackgroundContents( | 2527 bool Browser::MaybeCreateBackgroundContents( |
| 2522 int32_t route_id, | 2528 int32_t route_id, |
| 2523 int32_t main_frame_route_id, | 2529 int32_t main_frame_route_id, |
| 2524 int32_t main_frame_widget_route_id, | 2530 int32_t main_frame_widget_route_id, |
| 2525 WebContents* opener_web_contents, | 2531 WebContents* opener_web_contents, |
| 2526 const std::string& frame_name, | 2532 const std::string& frame_name, |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2595 if (contents && !allow_js_access) { | 2601 if (contents && !allow_js_access) { |
| 2596 contents->web_contents()->GetController().LoadURL( | 2602 contents->web_contents()->GetController().LoadURL( |
| 2597 target_url, | 2603 target_url, |
| 2598 content::Referrer(), | 2604 content::Referrer(), |
| 2599 ui::PAGE_TRANSITION_LINK, | 2605 ui::PAGE_TRANSITION_LINK, |
| 2600 std::string()); // No extra headers. | 2606 std::string()); // No extra headers. |
| 2601 } | 2607 } |
| 2602 | 2608 |
| 2603 return contents != NULL; | 2609 return contents != NULL; |
| 2604 } | 2610 } |
| OLD | NEW |