Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(363)

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 2510803003: Pass RapporService to content/browser/ (Closed)
Patch Set: Add a test for the current url API Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 2497 matching lines...) Expand 10 before | Expand all | Expand 10 after
2508 BookmarkBar::ANIMATE_STATE_CHANGE : 2508 BookmarkBar::ANIMATE_STATE_CHANGE :
2509 BookmarkBar::DONT_ANIMATE_STATE_CHANGE); 2509 BookmarkBar::DONT_ANIMATE_STATE_CHANGE);
2510 } 2510 }
2511 2511
2512 bool Browser::ShouldHideUIForFullscreen() const { 2512 bool Browser::ShouldHideUIForFullscreen() const {
2513 // Windows and GTK remove the browser controls in fullscreen, but Mac and Ash 2513 // Windows and GTK remove the browser controls in fullscreen, but Mac and Ash
2514 // keep the controls in a slide-down panel. 2514 // keep the controls in a slide-down panel.
2515 return window_ && window_->ShouldHideUIForFullscreen(); 2515 return window_ && window_->ShouldHideUIForFullscreen();
2516 } 2516 }
2517 2517
2518 ::rappor::RapporService* Browser::getRapporService() {
2519 if (g_browser_process->IsShuttingDown())
2520 return nullptr;
2521 return g_browser_process->rappor_service();
2522 }
2523
2518 bool Browser::ShouldStartShutdown() const { 2524 bool Browser::ShouldStartShutdown() const {
2519 return BrowserList::GetInstance()->size() <= 1; 2525 return BrowserList::GetInstance()->size() <= 1;
2520 } 2526 }
2521 2527
2522 bool Browser::MaybeCreateBackgroundContents( 2528 bool Browser::MaybeCreateBackgroundContents(
2523 int32_t route_id, 2529 int32_t route_id,
2524 int32_t main_frame_route_id, 2530 int32_t main_frame_route_id,
2525 int32_t main_frame_widget_route_id, 2531 int32_t main_frame_widget_route_id,
2526 WebContents* opener_web_contents, 2532 WebContents* opener_web_contents,
2527 const std::string& frame_name, 2533 const std::string& frame_name,
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
2596 if (contents && !allow_js_access) { 2602 if (contents && !allow_js_access) {
2597 contents->web_contents()->GetController().LoadURL( 2603 contents->web_contents()->GetController().LoadURL(
2598 target_url, 2604 target_url,
2599 content::Referrer(), 2605 content::Referrer(),
2600 ui::PAGE_TRANSITION_LINK, 2606 ui::PAGE_TRANSITION_LINK,
2601 std::string()); // No extra headers. 2607 std::string()); // No extra headers.
2602 } 2608 }
2603 2609
2604 return contents != NULL; 2610 return contents != NULL;
2605 } 2611 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698