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

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

Issue 9968078: Honor window size for chrome.windows.create when parent window is maximized. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove extraneous logging Created 8 years, 8 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"
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 return; 134 return;
135 } 135 }
136 136
137 const gfx::Size screen = gfx::Screen::GetPrimaryMonitorSize(); 137 const gfx::Size screen = gfx::Screen::GetPrimaryMonitorSize();
138 const gfx::Rect bounds(screen.width() - kPopupRight - kPopupWidth, 138 const gfx::Rect bounds(screen.width() - kPopupRight - kPopupWidth,
139 screen.height() - kPopupBottom - kPopupHeight, 139 screen.height() - kPopupBottom - kPopupHeight,
140 kPopupWidth, 140 kPopupWidth,
141 kPopupHeight); 141 kPopupHeight);
142 142
143 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); 143 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
144 mediaplayer_browser_ = Browser::CreateForApp(Browser::TYPE_PANEL, 144 mediaplayer_browser_ = Browser::CreateWithParams(
145 kMediaPlayerAppName, 145 Browser::CreateParams::CreateForApp(Browser::TYPE_PANEL,
146 bounds, 146 kMediaPlayerAppName,
147 profile); 147 bounds,
148 profile));
148 registrar_.Add(this, 149 registrar_.Add(this,
149 chrome::NOTIFICATION_BROWSER_CLOSED, 150 chrome::NOTIFICATION_BROWSER_CLOSED,
150 content::Source<Browser>(mediaplayer_browser_)); 151 content::Source<Browser>(mediaplayer_browser_));
151 152
152 mediaplayer_browser_->AddSelectedTabWithURL(GetMediaPlayerUrl(), 153 mediaplayer_browser_->AddSelectedTabWithURL(GetMediaPlayerUrl(),
153 content::PAGE_TRANSITION_LINK); 154 content::PAGE_TRANSITION_LINK);
154 mediaplayer_browser_->window()->Show(); 155 mediaplayer_browser_->window()->Show();
155 } 156 }
156 157
157 GURL MediaPlayer::GetOriginUrl() const { 158 GURL MediaPlayer::GetOriginUrl() const {
158 return file_manager_util::GetMediaPlayerUrl().GetOrigin(); 159 return file_manager_util::GetMediaPlayerUrl().GetOrigin();
159 } 160 }
160 161
161 GURL MediaPlayer::GetMediaPlayerUrl() const { 162 GURL MediaPlayer::GetMediaPlayerUrl() const {
162 return file_manager_util::GetMediaPlayerUrl(); 163 return file_manager_util::GetMediaPlayerUrl();
163 } 164 }
164 165
165 MediaPlayer::MediaPlayer() 166 MediaPlayer::MediaPlayer()
166 : current_position_(0), 167 : current_position_(0),
167 mediaplayer_browser_(NULL) { 168 mediaplayer_browser_(NULL) {
168 }; 169 };
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/tab_closeable_state_watcher_browsertest.cc » ('j') | chrome/browser/ui/browser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698