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

Side by Side Diff: chrome/browser/ui/views/notifications/balloon_view.cc

Issue 5841002: Finish deinlining virtual methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: revert parts of the balloon modifications Created 10 years 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) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/views/notifications/balloon_view.h" 5 #include "chrome/browser/views/notifications/balloon_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 124
125 gfx::Size BalloonViewImpl::GetSize() const { 125 gfx::Size BalloonViewImpl::GetSize() const {
126 // BalloonView has no size if it hasn't been shown yet (which is when 126 // BalloonView has no size if it hasn't been shown yet (which is when
127 // balloon_ is set). 127 // balloon_ is set).
128 if (!balloon_) 128 if (!balloon_)
129 return gfx::Size(0, 0); 129 return gfx::Size(0, 0);
130 130
131 return gfx::Size(GetTotalWidth(), GetTotalHeight()); 131 return gfx::Size(GetTotalWidth(), GetTotalHeight());
132 } 132 }
133 133
134 BalloonHost* BalloonViewImpl::GetHost() const {
135 return html_contents_.get();
136 }
137
134 void BalloonViewImpl::RunMenu(views::View* source, const gfx::Point& pt) { 138 void BalloonViewImpl::RunMenu(views::View* source, const gfx::Point& pt) {
135 RunOptionsMenu(pt); 139 RunOptionsMenu(pt);
136 } 140 }
137 141
138 void BalloonViewImpl::DisplayChanged() { 142 void BalloonViewImpl::DisplayChanged() {
139 collection_->DisplayChanged(); 143 collection_->DisplayChanged();
140 } 144 }
141 145
142 void BalloonViewImpl::WorkAreaChanged() { 146 void BalloonViewImpl::WorkAreaChanged() {
143 collection_->DisplayChanged(); 147 collection_->DisplayChanged();
(...skipping 15 matching lines...) Expand all
159 frame_container_->GetRootView()->RemoveAllChildViews(true); 163 frame_container_->GetRootView()->RemoveAllChildViews(true);
160 frame_container_->CloseNow(); 164 frame_container_->CloseNow();
161 balloon_->OnClose(by_user); 165 balloon_->OnClose(by_user);
162 } 166 }
163 167
164 void BalloonViewImpl::DidChangeBounds(const gfx::Rect& previous, 168 void BalloonViewImpl::DidChangeBounds(const gfx::Rect& previous,
165 const gfx::Rect& current) { 169 const gfx::Rect& current) {
166 SizeContentsWindow(); 170 SizeContentsWindow();
167 } 171 }
168 172
173 gfx::Size BalloonViewImpl::GetPreferredSize() {
174 return gfx::Size(1000, 1000);
175 }
176
169 void BalloonViewImpl::SizeContentsWindow() { 177 void BalloonViewImpl::SizeContentsWindow() {
170 if (!html_container_ || !frame_container_) 178 if (!html_container_ || !frame_container_)
171 return; 179 return;
172 180
173 gfx::Rect contents_rect = GetContentsRectangle(); 181 gfx::Rect contents_rect = GetContentsRectangle();
174 html_container_->SetBounds(contents_rect); 182 html_container_->SetBounds(contents_rect);
175 html_container_->MoveAbove(frame_container_); 183 html_container_->MoveAbove(frame_container_);
176 184
177 gfx::Path path; 185 gfx::Path path;
178 GetContentsMask(contents_rect, &path); 186 GetContentsMask(contents_rect, &path);
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 NOTREACHED(); 502 NOTREACHED();
495 return; 503 return;
496 } 504 }
497 505
498 // If the renderer process attached to this balloon is disconnected 506 // If the renderer process attached to this balloon is disconnected
499 // (e.g., because of a crash), we want to close the balloon. 507 // (e.g., because of a crash), we want to close the balloon.
500 notification_registrar_.Remove(this, 508 notification_registrar_.Remove(this,
501 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_)); 509 NotificationType::NOTIFY_BALLOON_DISCONNECTED, Source<Balloon>(balloon_));
502 Close(false); 510 Close(false);
503 } 511 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698