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

Side by Side Diff: chrome/browser/chromeos/notifications/balloon_view.cc

Issue 7349021: Convert some more view methods to the ui/views style. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' 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/chromeos/notifications/balloon_view.h" 5 #include "chrome/browser/chromeos/notifications/balloon_view.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 return balloon_->notification().notification_id() == 323 return balloon_->notification().notification_id() ==
324 notification.notification_id(); 324 notification.notification_id();
325 } 325 }
326 326
327 void BalloonViewImpl::Activated() { 327 void BalloonViewImpl::Activated() {
328 if (!control_view_host_.get()) 328 if (!control_view_host_.get())
329 return; 329 return;
330 330
331 // Get the size of Control View. 331 // Get the size of Control View.
332 gfx::Size size = 332 gfx::Size size =
333 control_view_host_->GetRootView()->GetChildViewAt(0)->GetPreferredSize(); 333 control_view_host_->GetRootView()->child_at(0)->GetPreferredSize();
334 control_view_host_->Show(); 334 control_view_host_->Show();
335 control_view_host_->SetBounds( 335 control_view_host_->SetBounds(
336 gfx::Rect(width() - size.width() - kControlViewRightMargin, 336 gfx::Rect(width() - size.width() - kControlViewRightMargin,
337 kControlViewTopMargin, 337 kControlViewTopMargin,
338 size.width(), size.height())); 338 size.width(), size.height()));
339 } 339 }
340 340
341 void BalloonViewImpl::Deactivated() { 341 void BalloonViewImpl::Deactivated() {
342 if (control_view_host_.get()) { 342 if (control_view_host_.get()) {
343 control_view_host_->Hide(); 343 control_view_host_->Hide();
(...skipping 15 matching lines...) Expand all
359 service->DenyPermission(balloon_->notification().origin_url()); 359 service->DenyPermission(balloon_->notification().origin_url());
360 } 360 }
361 361
362 gfx::NativeView BalloonViewImpl::GetParentNativeView() { 362 gfx::NativeView BalloonViewImpl::GetParentNativeView() {
363 RenderWidgetHostView* view = html_contents_->render_view_host()->view(); 363 RenderWidgetHostView* view = html_contents_->render_view_host()->view();
364 DCHECK(view); 364 DCHECK(view);
365 return view->GetNativeView(); 365 return view->GetNativeView();
366 } 366 }
367 367
368 } // namespace chromeos 368 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/views_oobe_display.cc ('k') | chrome/browser/chromeos/notifications/notification_panel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698