summaryrefslogtreecommitdiffstats
path: root/chrome/views/view_win.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-17 01:36:03 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-17 01:36:03 +0000
commite044f8df992fcb9f289b98115d0722dcd8cea103 (patch)
tree6844ce69dfaf4cbdfe0e540e6647ef60b3c22451 /chrome/views/view_win.cc
parent81514c583f3c281ddbb72d13a021bfed58f7e3c7 (diff)
downloadchromium_src-e044f8df992fcb9f289b98115d0722dcd8cea103.zip
chromium_src-e044f8df992fcb9f289b98115d0722dcd8cea103.tar.gz
chromium_src-e044f8df992fcb9f289b98115d0722dcd8cea103.tar.bz2
Revert "Add #ifdefs to the views/ code and move windows specific code
into their own files to get some files compiling." Conflicts with something that went in in the interim... Review URL: http://codereview.chromium.org/18187 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8251 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/view_win.cc')
-rw-r--r--chrome/views/view_win.cc91
1 files changed, 0 insertions, 91 deletions
diff --git a/chrome/views/view_win.cc b/chrome/views/view_win.cc
deleted file mode 100644
index 190d21f..0000000
--- a/chrome/views/view_win.cc
+++ /dev/null
@@ -1,91 +0,0 @@
-// Copyright (c) 2009 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/views/view.h"
-
-#include "base/scoped_handle.h"
-#include "base/string_util.h"
-#include "chrome/common/gfx/chrome_canvas.h"
-#include "chrome/common/gfx/path.h"
-#include "chrome/common/os_exchange_data.h"
-#include "chrome/views/accessibility/accessible_wrapper.h"
-#include "chrome/views/border.h"
-#include "chrome/views/root_view.h"
-#include "chrome/views/widget.h"
-
-namespace views {
-
-FocusManager* View::GetFocusManager() {
- Widget* widget = GetWidget();
- if (!widget)
- return NULL;
-
- HWND hwnd = widget->GetHWND();
- if (!hwnd)
- return NULL;
-
- return FocusManager::GetFocusManager(hwnd);
-}
-
-void View::DoDrag(const MouseEvent& e, int press_x, int press_y) {
- scoped_refptr<OSExchangeData> data = new OSExchangeData;
- WriteDragData(press_x, press_y, data.get());
-
- // Message the RootView to do the drag and drop. That way if we're removed
- // the RootView can detect it and avoid calling us back.
- RootView* root_view = GetRootView();
- root_view->StartDragForViewFromMouseEvent(
- this, data, GetDragOperations(press_x, press_y));
-}
-
-AccessibleWrapper* View::GetAccessibleWrapper() {
- if (accessibility_.get() == NULL) {
- accessibility_.reset(new AccessibleWrapper(this));
- }
- return accessibility_.get();
-}
-
-bool View::HitTest(const gfx::Point& l) const {
- if (l.x() >= 0 && l.x() < static_cast<int>(width()) &&
- l.y() >= 0 && l.y() < static_cast<int>(height())) {
- if (HasHitTestMask()) {
- gfx::Path mask;
- GetHitTestMask(&mask);
- ScopedHRGN rgn(mask.CreateHRGN());
- return !!PtInRegion(rgn, l.x(), l.y());
- }
- // No mask, but inside our bounds.
- return true;
- }
- // Outside our bounds.
- return false;
-}
-
-HCURSOR View::GetCursorForPoint(Event::EventType event_type, int x, int y) {
- return NULL;
-}
-
-void View::Focus() {
- // Set the native focus to the root view window so it receives the keyboard
- // messages.
- FocusManager* focus_manager = GetFocusManager();
- if (focus_manager)
- focus_manager->FocusHWND(GetRootView()->GetWidget()->GetHWND());
-}
-
-int View::GetHorizontalDragThreshold() {
- static int threshold = -1;
- if (threshold == -1)
- threshold = GetSystemMetrics(SM_CXDRAG) / 2;
- return threshold;
-}
-
-int View::GetVerticalDragThreshold() {
- static int threshold = -1;
- if (threshold == -1)
- threshold = GetSystemMetrics(SM_CYDRAG) / 2;
- return threshold;
-}
-
-} // namespace views