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

Side by Side Diff: chrome/browser/notifications/balloon_host.cc

Issue 7464009: Removal of Profile from content part 1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: works now Created 9 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/notifications/balloon_host.h" 5 #include "chrome/browser/notifications/balloon_host.h"
6 #include "chrome/browser/notifications/balloon.h" 6 #include "chrome/browser/notifications/balloon.h"
7 #include "chrome/browser/notifications/notification.h" 7 #include "chrome/browser/notifications/notification.h"
8 #include "chrome/browser/profiles/profile.h" 8 #include "chrome/browser/profiles/profile.h"
9 #include "chrome/browser/renderer_preferences_util.h" 9 #include "chrome/browser/renderer_preferences_util.h"
10 #include "chrome/browser/ui/browser_list.h" 10 #include "chrome/browser/ui/browser_list.h"
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 } 166 }
167 167
168 void BalloonHost::UpdatePreferredSize(const gfx::Size& new_size) { 168 void BalloonHost::UpdatePreferredSize(const gfx::Size& new_size) {
169 balloon_->SetContentPreferredSize(new_size); 169 balloon_->SetContentPreferredSize(new_size);
170 } 170 }
171 171
172 void BalloonHost::HandleMouseDown() { 172 void BalloonHost::HandleMouseDown() {
173 balloon_->OnClick(); 173 balloon_->OnClick();
174 } 174 }
175 175
176 RendererPreferences BalloonHost::GetRendererPrefs(Profile* profile) const { 176 RendererPreferences BalloonHost::GetRendererPrefs(
177 content::BrowserContext* context) const {
178 Profile* profile = static_cast<Profile*>(context);
177 RendererPreferences preferences; 179 RendererPreferences preferences;
178 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile); 180 renderer_preferences_util::UpdateFromSystemSettings(&preferences, profile);
179 return preferences; 181 return preferences;
180 } 182 }
181 183
182 void BalloonHost::Init() { 184 void BalloonHost::Init() {
183 DCHECK(!render_view_host_) << "BalloonViewHost already initialized."; 185 DCHECK(!render_view_host_) << "BalloonViewHost already initialized.";
184 RenderViewHost* rvh = new RenderViewHost( 186 RenderViewHost* rvh = new RenderViewHost(
185 site_instance_.get(), this, MSG_ROUTING_NONE, NULL); 187 site_instance_.get(), this, MSG_ROUTING_NONE, NULL);
186 if (enable_web_ui_) 188 if (enable_web_ui_)
(...skipping 27 matching lines...) Expand all
214 216
215 should_notify_on_disconnect_ = false; 217 should_notify_on_disconnect_ = false;
216 NotificationService::current()->Notify( 218 NotificationService::current()->Notify(
217 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED, 219 chrome::NOTIFICATION_NOTIFY_BALLOON_DISCONNECTED,
218 Source<BalloonHost>(this), NotificationService::NoDetails()); 220 Source<BalloonHost>(this), NotificationService::NoDetails());
219 } 221 }
220 222
221 bool BalloonHost::IsRenderViewReady() const { 223 bool BalloonHost::IsRenderViewReady() const {
222 return should_notify_on_disconnect_; 224 return should_notify_on_disconnect_;
223 } 225 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698