diff options
author | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
---|---|---|
committer | maruel@google.com <maruel@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-15 12:27:03 +0000 |
commit | 1eb89e8fbf2d31247f5ceb271d8887a63d4a2bcf (patch) | |
tree | b78be07dbada3ac0f6d2435558e4a6aaba198ffc /chrome/views/root_view.cc | |
parent | ea15e98a9353494df754a11fb49f0e4b8c0d4789 (diff) | |
download | chromium_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/root_view.cc')
-rw-r--r-- | chrome/views/root_view.cc | 24 |
1 files changed, 10 insertions, 14 deletions
diff --git a/chrome/views/root_view.cc b/chrome/views/root_view.cc index 8145d16..c533ef0 100644 --- a/chrome/views/root_view.cc +++ b/chrome/views/root_view.cc @@ -27,22 +27,18 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -#include <algorithm> - #include "chrome/views/root_view.h" +#include <algorithm> + #include "base/base_drag_source.h" #include "base/logging.h" #include "base/message_loop.h" -#include "chrome/common/notification_service.h" -#include "chrome/common/os_exchange_data.h" -#include "chrome/views/event.h" -#include "chrome/views/focus_manager.h" +#include "chrome/common/drag_drop_types.h" +#include "chrome/common/gfx/chrome_canvas.h" #include "chrome/views/root_view_drop_target.h" #include "chrome/views/view_container.h" -#include "chrome/common/gfx/chrome_canvas.h" - namespace ChromeViews { ///////////////////////////////////////////////////////////////////////////// @@ -307,7 +303,7 @@ bool RootView::OnMousePressed(const MouseEvent& e) { bool hit_disabled_view = false; // Walk up the tree until we find a view that wants the mouse event. - for (mouse_pressed_handler_ = GetViewForPoint(e.GetLocation()); + for (mouse_pressed_handler_ = GetViewForPoint(WTL::CPoint(e.GetX(), e.GetY())); mouse_pressed_handler_ && (mouse_pressed_handler_ != this); mouse_pressed_handler_ = mouse_pressed_handler_->GetParent()) { if (!mouse_pressed_handler_->IsEnabled()) { @@ -384,7 +380,7 @@ bool RootView::OnMouseDragged(const MouseEvent& e) { SetMouseLocationAndFlags(e); CPoint p; - ConvertPointToMouseHandler(e.GetLocation(), &p); + ConvertPointToMouseHandler(WTL::CPoint(e.GetX(), e.GetY()), &p); MouseEvent mouse_event(e.GetType(), p.x, p.y, e.GetFlags()); if (!mouse_pressed_handler_->ProcessMouseDragged(mouse_event, &drag_info)) { @@ -402,7 +398,7 @@ void RootView::OnMouseReleased(const MouseEvent& e, bool canceled) { if (mouse_pressed_handler_) { CPoint p; - ConvertPointToMouseHandler(e.GetLocation(), &p); + ConvertPointToMouseHandler(WTL::CPoint(e.GetX(), e.GetY()), &p); MouseEvent mouse_released(e.GetType(), p.x, p.y, e.GetFlags()); // We allow the view to delete us from ProcessMouseReleased. As such, // configure state such that we're done first, then call View. @@ -415,10 +411,10 @@ void RootView::OnMouseReleased(const MouseEvent& e, bool canceled) { } void RootView::UpdateCursor(const MouseEvent& e) { - View *v = GetViewForPoint(e.GetLocation()); + View *v = GetViewForPoint(WTL::CPoint(e.GetX(), e.GetY())); if (v && v != this) { - CPoint l(e.GetLocation()); + CPoint l(e.GetX(), e.GetY()); View::ConvertPointToView(this, v, &l); HCURSOR cursor = v->GetCursorForPoint(e.GetType(), l.x, l.y); if (cursor) { @@ -432,7 +428,7 @@ void RootView::UpdateCursor(const MouseEvent& e) { } void RootView::OnMouseMoved(const MouseEvent& e) { - View *v = GetViewForPoint(e.GetLocation()); + View *v = GetViewForPoint(WTL::CPoint(e.GetX(), e.GetY())); // Find the first enabled view. while (v && !v->IsEnabled()) v = v->GetParent(); |