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

Side by Side Diff: chrome/browser/chromeos/media/media_player.cc

Issue 10702029: Move tab functions off Browser into browser_tabstrip and browser_tabrestore. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 5 months 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/chromeos/media/media_player.h" 5 #include "chrome/browser/chromeos/media/media_player.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "chrome/browser/chromeos/extensions/file_manager_util.h" 10 #include "chrome/browser/chromeos/extensions/file_manager_util.h"
11 #include "chrome/browser/chromeos/extensions/media_player_event_router.h" 11 #include "chrome/browser/chromeos/extensions/media_player_event_router.h"
12 #include "chrome/browser/profiles/profile.h" 12 #include "chrome/browser/profiles/profile.h"
13 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
14 #include "chrome/browser/ui/browser.h" 14 #include "chrome/browser/ui/browser.h"
15 #include "chrome/browser/ui/browser_list.h" 15 #include "chrome/browser/ui/browser_list.h"
16 #include "chrome/browser/ui/browser_tabstrip.h"
16 #include "chrome/browser/ui/browser_window.h" 17 #include "chrome/browser/ui/browser_window.h"
17 #include "chrome/common/chrome_notification_types.h" 18 #include "chrome/common/chrome_notification_types.h"
18 #include "content/public/browser/browser_thread.h" 19 #include "content/public/browser/browser_thread.h"
19 #include "content/public/browser/user_metrics.h" 20 #include "content/public/browser/user_metrics.h"
20 #include "net/url_request/url_request_job.h" 21 #include "net/url_request/url_request_job.h"
21 #include "ui/gfx/screen.h" 22 #include "ui/gfx/screen.h"
22 23
23 using content::BrowserThread; 24 using content::BrowserThread;
24 using content::UserMetricsAction; 25 using content::UserMetricsAction;
25 26
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 134 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
134 mediaplayer_browser_ = Browser::CreateWithParams( 135 mediaplayer_browser_ = Browser::CreateWithParams(
135 Browser::CreateParams::CreateForApp(Browser::TYPE_PANEL, 136 Browser::CreateParams::CreateForApp(Browser::TYPE_PANEL,
136 kMediaPlayerAppName, 137 kMediaPlayerAppName,
137 bounds, 138 bounds,
138 profile)); 139 profile));
139 registrar_.Add(this, 140 registrar_.Add(this,
140 chrome::NOTIFICATION_BROWSER_CLOSED, 141 chrome::NOTIFICATION_BROWSER_CLOSED,
141 content::Source<Browser>(mediaplayer_browser_)); 142 content::Source<Browser>(mediaplayer_browser_));
142 143
143 mediaplayer_browser_->AddSelectedTabWithURL(GetMediaPlayerUrl(), 144 chrome::AddSelectedTabWithURL(mediaplayer_browser_, GetMediaPlayerUrl(),
144 content::PAGE_TRANSITION_LINK); 145 content::PAGE_TRANSITION_LINK);
145 mediaplayer_browser_->window()->Show(); 146 mediaplayer_browser_->window()->Show();
146 } 147 }
147 148
148 GURL MediaPlayer::GetMediaPlayerUrl() const { 149 GURL MediaPlayer::GetMediaPlayerUrl() const {
149 return file_manager_util::GetMediaPlayerUrl(); 150 return file_manager_util::GetMediaPlayerUrl();
150 } 151 }
151 152
152 MediaPlayer::MediaPlayer() 153 MediaPlayer::MediaPlayer()
153 : current_position_(0), 154 : current_position_(0),
154 mediaplayer_browser_(NULL) { 155 mediaplayer_browser_(NULL) {
155 }; 156 };
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/gdata/drive_task_executor.cc ('k') | chrome/browser/chromeos/oom_priority_manager_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698