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

Side by Side Diff: chrome/browser/ui/touch/tabs/touch_tab.cc

Issue 6334152: Clean up RTL methods.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/touch/tabs/touch_tab.h" 5 #include "chrome/browser/ui/touch/tabs/touch_tab.h"
6 6
7 #include "chrome/browser/themes/browser_theme_provider.h" 7 #include "chrome/browser/themes/browser_theme_provider.h"
8 #include "grit/app_resources.h" 8 #include "grit/app_resources.h"
9 #include "grit/theme_resources.h" 9 #include "grit/theme_resources.h"
10 #include "ui/base/resource/resource_bundle.h" 10 #include "ui/base/resource/resource_bundle.h"
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 //////////////////////////////////////////////////////////////////////////////// 98 ////////////////////////////////////////////////////////////////////////////////
99 // TouchTab, private: 99 // TouchTab, private:
100 100
101 void TouchTab::PaintTabBackground(gfx::Canvas* canvas) { 101 void TouchTab::PaintTabBackground(gfx::Canvas* canvas) {
102 if (IsSelected()) { 102 if (IsSelected()) {
103 PaintActiveTabBackground(canvas); 103 PaintActiveTabBackground(canvas);
104 } 104 }
105 } 105 }
106 106
107 void TouchTab::PaintActiveTabBackground(gfx::Canvas* canvas) { 107 void TouchTab::PaintActiveTabBackground(gfx::Canvas* canvas) {
108 int offset = GetX(views::View::APPLY_MIRRORING_TRANSFORMATION) + 108 int offset = GetMirroredX() + background_offset_.x();
109 background_offset_.x();
110 ThemeProvider* tp = GetThemeProvider(); 109 ThemeProvider* tp = GetThemeProvider();
111 if (!tp) 110 if (!tp)
112 NOTREACHED() << "Unable to get theme provider"; 111 NOTREACHED() << "Unable to get theme provider";
113 112
114 SkBitmap* tab_bg = GetThemeProvider()->GetBitmapNamed(IDR_THEME_TOOLBAR); 113 SkBitmap* tab_bg = GetThemeProvider()->GetBitmapNamed(IDR_THEME_TOOLBAR);
115 114
116 TouchTabImage* tab_image = &tab_active; 115 TouchTabImage* tab_image = &tab_active;
117 TouchTabImage* alpha = &tab_alpha; 116 TouchTabImage* alpha = &tab_alpha;
118 117
119 // Draw left edge. 118 // Draw left edge.
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT); 225 tab_active.image_r = rb.GetBitmapNamed(IDR_TAB_ACTIVE_RIGHT);
227 tab_active.l_width = tab_active.image_l->width(); 226 tab_active.l_width = tab_active.image_l->width();
228 tab_active.r_width = tab_active.image_r->width(); 227 tab_active.r_width = tab_active.image_r->width();
229 228
230 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT); 229 tab_inactive.image_l = rb.GetBitmapNamed(IDR_TAB_INACTIVE_LEFT);
231 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER); 230 tab_inactive.image_c = rb.GetBitmapNamed(IDR_TAB_INACTIVE_CENTER);
232 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT); 231 tab_inactive.image_r = rb.GetBitmapNamed(IDR_TAB_INACTIVE_RIGHT);
233 tab_inactive.l_width = tab_inactive.image_l->width(); 232 tab_inactive.l_width = tab_inactive.image_l->width();
234 tab_inactive.r_width = tab_inactive.image_r->width(); 233 tab_inactive.r_width = tab_inactive.image_r->width();
235 } 234 }
OLDNEW
« no previous file with comments | « chrome/browser/download/download_util.cc ('k') | chrome/browser/ui/views/autocomplete/autocomplete_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698