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

Side by Side Diff: chrome/browser/views/tabs/tab.cc

Issue 114054: Splits TooltipManager so that it can be ported and stubs out the GTK... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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 | views/views.gyp » ('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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/tabs/tab.h" 5 #include "chrome/browser/views/tabs/tab.h"
6 6
7 #include "app/gfx/canvas.h" 7 #include "app/gfx/canvas.h"
8 #include "app/gfx/font.h" 8 #include "app/gfx/font.h"
9 #include "app/gfx/path.h" 9 #include "app/gfx/path.h"
10 #include "app/l10n_util.h" 10 #include "app/l10n_util.h"
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
207 *tooltip = title; 207 *tooltip = title;
208 return true; 208 return true;
209 } 209 }
210 } 210 }
211 return false; 211 return false;
212 } 212 }
213 213
214 bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) { 214 bool Tab::GetTooltipTextOrigin(int x, int y, gfx::Point* origin) {
215 gfx::Font font; 215 gfx::Font font;
216 origin->set_x(title_bounds().x() + 10); 216 origin->set_x(title_bounds().x() + 10);
217 #if defined(OS_WIN)
218 origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4); 217 origin->set_y(-views::TooltipManager::GetTooltipHeight() - 4);
219 #endif
220 return true; 218 return true;
221 } 219 }
222 220
223 bool Tab::GetAccessibleRole(AccessibilityTypes::Role* role) { 221 bool Tab::GetAccessibleRole(AccessibilityTypes::Role* role) {
224 DCHECK(role); 222 DCHECK(role);
225 223
226 *role = AccessibilityTypes::ROLE_PAGETAB; 224 *role = AccessibilityTypes::ROLE_PAGETAB;
227 return true; 225 return true;
228 } 226 }
229 227
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 276
279 // Close out the path. 277 // Close out the path.
280 path->lineTo(0, h); 278 path->lineTo(0, h);
281 path->close(); 279 path->close();
282 } 280 }
283 281
284 void Tab::ContextMenuClosed() { 282 void Tab::ContextMenuClosed() {
285 delegate()->StopAllHighlighting(); 283 delegate()->StopAllHighlighting();
286 menu_controller_ = NULL; 284 menu_controller_ = NULL;
287 } 285 }
OLDNEW
« no previous file with comments | « no previous file | views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698