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

Side by Side Diff: chrome/browser/ui/views/tabs/base_tab.cc

Issue 10446090: Changes the tabstrip dragging code to use coordinates from the events (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/tabs/base_tab.h" 5 #include "chrome/browser/ui/views/tabs/base_tab.h"
6 6
7 #include <limits> 7 #include <limits>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
328 } else if (!IsSelected()) { 328 } else if (!IsSelected()) {
329 controller()->SelectTab(this); 329 controller()->SelectTab(this);
330 } 330 }
331 controller()->MaybeStartDrag(this, event, original_selection); 331 controller()->MaybeStartDrag(this, event, original_selection);
332 } 332 }
333 return true; 333 return true;
334 } 334 }
335 335
336 bool BaseTab::OnMouseDragged(const views::MouseEvent& event) { 336 bool BaseTab::OnMouseDragged(const views::MouseEvent& event) {
337 if (controller()) 337 if (controller())
338 controller()->ContinueDrag(event); 338 controller()->ContinueDrag(this, event.location());
339 return true; 339 return true;
340 } 340 }
341 341
342 void BaseTab::OnMouseReleased(const views::MouseEvent& event) { 342 void BaseTab::OnMouseReleased(const views::MouseEvent& event) {
343 if (!controller()) 343 if (!controller())
344 return; 344 return;
345 345
346 controller()->OnMouseEventInTab(this, event); 346 controller()->OnMouseEventInTab(this, event);
347 347
348 // Notify the drag helper that we're done with any potential drag operations. 348 // Notify the drag helper that we're done with any potential drag operations.
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 // static 599 // static
600 void BaseTab::InitResources() { 600 void BaseTab::InitResources() {
601 static bool initialized = false; 601 static bool initialized = false;
602 if (!initialized) { 602 if (!initialized) {
603 initialized = true; 603 initialized = true;
604 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); 604 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance();
605 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont)); 605 font_ = new gfx::Font(rb.GetFont(ui::ResourceBundle::BaseFont));
606 font_height_ = font_->GetHeight(); 606 font_height_ = font_->GetHeight();
607 } 607 }
608 } 608 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/tabs/tab_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698