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

Unified Diff: chrome/browser/ui/views/bubble/border_widget_win.cc

Issue 8761012: Remove the old views bubble code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sync. Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bubble/border_widget_win.h ('k') | chrome/browser/ui/views/bubble/bubble.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bubble/border_widget_win.cc
diff --git a/chrome/browser/ui/views/bubble/border_widget_win.cc b/chrome/browser/ui/views/bubble/border_widget_win.cc
deleted file mode 100644
index 1a5be373212648d1640efc6f7b653073821da9a1..0000000000000000000000000000000000000000
--- a/chrome/browser/ui/views/bubble/border_widget_win.cc
+++ /dev/null
@@ -1,55 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "chrome/browser/ui/views/bubble/border_widget_win.h"
-
-#include <windows.h>
-
-#include "chrome/browser/ui/views/bubble/border_contents.h"
-#include "ui/views/widget/widget.h"
-
-BorderWidgetWin::BorderWidgetWin()
- : views::NativeWidgetWin(new views::Widget),
- border_contents_(NULL) {
-}
-
-void BorderWidgetWin::InitBorderWidgetWin(BorderContents* border_contents,
- HWND owner) {
- DCHECK(!border_contents_);
- border_contents_ = border_contents;
- border_contents_->Init();
-
- views::Widget::InitParams params(views::Widget::InitParams::TYPE_POPUP);
- params.transparent = true;
- params.parent = owner;
- params.native_widget = this;
- GetWidget()->Init(params);
- GetWidget()->SetContentsView(border_contents_);
- SetWindowPos(owner, 0, 0, 0, 0,
- SWP_NOSIZE | SWP_NOMOVE | SWP_NOACTIVATE | SWP_NOREDRAW);
-}
-
-gfx::Rect BorderWidgetWin::SizeAndGetBounds(
- const gfx::Rect& position_relative_to,
- views::BubbleBorder::ArrowLocation arrow_location,
- const gfx::Size& contents_size) {
- // Ask the border view to calculate our bounds (and our contents').
- gfx::Rect contents_bounds;
- gfx::Rect window_bounds;
- border_contents_->SizeAndGetBounds(position_relative_to, arrow_location,
- false, contents_size, &contents_bounds,
- &window_bounds);
- GetWidget()->SetBounds(window_bounds);
-
- // Return |contents_bounds| in screen coordinates.
- contents_bounds.Offset(window_bounds.origin());
- return contents_bounds;
-}
-
-LRESULT BorderWidgetWin::OnMouseActivate(UINT message,
- WPARAM w_param,
- LPARAM l_param) {
- // Never activate.
- return MA_NOACTIVATE;
-}
« no previous file with comments | « chrome/browser/ui/views/bubble/border_widget_win.h ('k') | chrome/browser/ui/views/bubble/bubble.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698