summaryrefslogtreecommitdiffstats
path: root/chrome/views/view.cc
diff options
context:
space:
mode:
authormaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
committermaruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-08-15 12:27:03 +0000
commit1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch)
treeb78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/views/view.cc
parentea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff)
downloadchromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.zip
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.gz
chromium_src-1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf.tar.bz2
Large patch set (159 files total) to cleanup the includes.
- Slightly reduce the size of the generated .lib files ~3%. - Reduce the number of implicit and explicit atl and windows includes. hooray! - Help incremental build by reducing the number of unnecessary included files. - Split some template class in two, one base class for the common code and the specialization that inherits from the base class. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@937 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/view.cc')
-rw-r--r--chrome/views/view.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/chrome/views/view.cc b/chrome/views/view.cc
index 8df8da5..ad80fee 100644
--- a/chrome/views/view.cc
+++ b/chrome/views/view.cc
@@ -30,14 +30,19 @@
#include "chrome/views/view.h"
#include <algorithm>
-#include <sstream>
+
+#ifndef NDEBUG
#include <iostream>
+#endif
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/string_util.h"
+#include "chrome/common/drag_drop_types.h"
#include "chrome/common/gfx/chrome_canvas.h"
+#include "chrome/common/l10n_util.h"
#include "chrome/common/os_exchange_data.h"
+#include "chrome/views/accessibility/accessible_wrapper.h"
#include "chrome/views/background.h"
#include "chrome/views/border.h"
#include "chrome/views/layout_manager.h"
@@ -288,6 +293,11 @@ void View::SetLayoutManager(LayoutManager* layout_manager) {
}
}
+bool View::UILayoutIsRightToLeft() const {
+ return (ui_mirroring_is_enabled_for_rtl_languages_ &&
+ l10n_util::GetTextDirection() == l10n_util::RIGHT_TO_LEFT);
+}
+
////////////////////////////////////////////////////////////////////////////////
//
// View - Right-to-left UI layout
@@ -540,7 +550,7 @@ void View::SetContextMenuController(ContextMenuController* menu_controller) {
bool View::ProcessMousePressed(const MouseEvent& e, DragInfo* drag_info) {
const bool enabled = enabled_;
int drag_operations;
- if (enabled && e.IsOnlyLeftMouseButton() && HitTest(e.GetLocation()))
+ if (enabled && e.IsOnlyLeftMouseButton() && HitTest(WTL::CPoint(e.GetX(), e.GetY())))
drag_operations = GetDragOperations(e.GetX(), e.GetY());
else
drag_operations = 0;