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

Side by Side Diff: chrome/browser/views/blocked_popup_container_view_win.cc

Issue 125148: Making FocusManager portable to toolkit_views (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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) 2009 The Chromium Authors. All rights reserved. Use of this 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. Use of this
2 // source code is governed by a BSD-style license that can be found in the 2 // source code is governed by a BSD-style license that can be found in the
3 // LICENSE file. 3 // LICENSE file.
4 4
5 #include "chrome/browser/views/blocked_popup_container_view_win.h" 5 #include "chrome/browser/views/blocked_popup_container_view_win.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <windows.h> 8 #include <windows.h>
9 9
10 #include "app/gfx/canvas.h" 10 #include "app/gfx/canvas.h"
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 BlockedPopupContainerViewWin::BlockedPopupContainerViewWin( 391 BlockedPopupContainerViewWin::BlockedPopupContainerViewWin(
392 BlockedPopupContainer* container) 392 BlockedPopupContainer* container)
393 : slide_animation_(new SlideAnimation(this)), 393 : slide_animation_(new SlideAnimation(this)),
394 container_model_(container), 394 container_model_(container),
395 container_view_(NULL) { 395 container_view_(NULL) {
396 container_view_ = new BlockedPopupContainerInternalView(this); 396 container_view_ = new BlockedPopupContainerInternalView(this);
397 container_view_->SetVisible(true); 397 container_view_->SetVisible(true);
398 398
399 set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN); 399 set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);
400 WidgetWin::Init(GetModel()->GetConstrainingContents(NULL)->GetNativeView(), 400 WidgetWin::Init(GetModel()->GetConstrainingContents(NULL)->GetNativeView(),
401 gfx::Rect(), false); 401 gfx::Rect());
402 SetContentsView(container_view_); 402 SetContentsView(container_view_);
403 SetPosition(); 403 SetPosition();
404 } 404 }
405 405
406 void BlockedPopupContainerViewWin::OnSize(UINT param, const CSize& size) { 406 void BlockedPopupContainerViewWin::OnSize(UINT param, const CSize& size) {
407 // Set the window region so we have rounded corners on the top. 407 // Set the window region so we have rounded corners on the top.
408 SkRect rect; 408 SkRect rect;
409 rect.set(0, 0, SkIntToScalar(size.cx), SkIntToScalar(size.cy)); 409 rect.set(0, 0, SkIntToScalar(size.cx), SkIntToScalar(size.cy));
410 gfx::Path path; 410 gfx::Path path;
411 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction); 411 path.addRoundRect(rect, kRoundedCornerRad, SkPath::kCW_Direction);
412 SetWindowRgn(path.CreateHRGN(), TRUE); 412 SetWindowRgn(path.CreateHRGN(), TRUE);
413 413
414 ChangeSize(param, size); 414 ChangeSize(param, size);
415 } 415 }
OLDNEW
« no previous file with comments | « chrome/browser/views/autocomplete/autocomplete_popup_win.cc ('k') | chrome/browser/views/bookmark_bubble_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698