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

Side by Side Diff: chrome/browser/views/frame/browser_view.cc

Issue 2811032: Revert 50784 - Canvas refactoring part 3.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/frame/browser_view.h" 5 #include "chrome/browser/views/frame/browser_view.h"
6 6
7 #if defined(OS_LINUX) 7 #if defined(OS_LINUX)
8 #include <gtk/gtk.h> 8 #include <gtk/gtk.h>
9 #endif 9 #endif
10 10
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 #include "chrome/browser/views/tabs/side_tab_strip.h" 42 #include "chrome/browser/views/tabs/side_tab_strip.h"
43 #include "chrome/browser/views/theme_install_bubble_view.h" 43 #include "chrome/browser/views/theme_install_bubble_view.h"
44 #include "chrome/browser/views/toolbar_view.h" 44 #include "chrome/browser/views/toolbar_view.h"
45 #include "chrome/browser/views/update_recommended_message_box.h" 45 #include "chrome/browser/views/update_recommended_message_box.h"
46 #include "chrome/browser/window_sizer.h" 46 #include "chrome/browser/window_sizer.h"
47 #include "chrome/common/chrome_switches.h" 47 #include "chrome/common/chrome_switches.h"
48 #include "chrome/common/extensions/extension_resource.h" 48 #include "chrome/common/extensions/extension_resource.h"
49 #include "chrome/common/native_window_notification_source.h" 49 #include "chrome/common/native_window_notification_source.h"
50 #include "chrome/common/notification_service.h" 50 #include "chrome/common/notification_service.h"
51 #include "chrome/common/pref_names.h" 51 #include "chrome/common/pref_names.h"
52 #include "gfx/canvas_skia.h" 52 #include "gfx/canvas.h"
53 #include "grit/app_resources.h" 53 #include "grit/app_resources.h"
54 #include "grit/chromium_strings.h" 54 #include "grit/chromium_strings.h"
55 #include "grit/generated_resources.h" 55 #include "grit/generated_resources.h"
56 #include "grit/locale_settings.h" 56 #include "grit/locale_settings.h"
57 #include "grit/theme_resources.h" 57 #include "grit/theme_resources.h"
58 #include "grit/webkit_resources.h" 58 #include "grit/webkit_resources.h"
59 #include "views/controls/single_split_view.h" 59 #include "views/controls/single_split_view.h"
60 #include "views/focus/external_focus_tracker.h" 60 #include "views/focus/external_focus_tracker.h"
61 #include "views/focus/view_storage.h" 61 #include "views/focus/view_storage.h"
62 #include "views/grid_layout.h" 62 #include "views/grid_layout.h"
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
214 if (!window || (window->IsMaximized() || window->IsFullscreen())) 214 if (!window || (window->IsMaximized() || window->IsFullscreen()))
215 return; 215 return;
216 216
217 SkBitmap* bitmap = ResourceBundle::GetSharedInstance().GetBitmapNamed( 217 SkBitmap* bitmap = ResourceBundle::GetSharedInstance().GetBitmapNamed(
218 IDR_TEXTAREA_RESIZER); 218 IDR_TEXTAREA_RESIZER);
219 bitmap->buildMipMap(false); 219 bitmap->buildMipMap(false);
220 bool rtl_dir = base::i18n::IsRTL(); 220 bool rtl_dir = base::i18n::IsRTL();
221 if (rtl_dir) { 221 if (rtl_dir) {
222 canvas->TranslateInt(width(), 0); 222 canvas->TranslateInt(width(), 0);
223 canvas->ScaleInt(-1, 1); 223 canvas->ScaleInt(-1, 1);
224 canvas->AsCanvasSkia()->save(); 224 canvas->save();
225 } 225 }
226 canvas->DrawBitmapInt(*bitmap, width() - bitmap->width(), 226 canvas->DrawBitmapInt(*bitmap, width() - bitmap->width(),
227 height() - bitmap->height()); 227 height() - bitmap->height());
228 if (rtl_dir) 228 if (rtl_dir)
229 canvas->AsCanvasSkia()->restore(); 229 canvas->restore();
230 } 230 }
231 231
232 static gfx::Size GetSize() { 232 static gfx::Size GetSize() {
233 // This is disabled until we find what makes us slower when we let 233 // This is disabled until we find what makes us slower when we let
234 // WebKit know that we have a resizer rect... 234 // WebKit know that we have a resizer rect...
235 // int scrollbar_thickness = gfx::scrollbar_size(); 235 // int scrollbar_thickness = gfx::scrollbar_size();
236 // return gfx::Size(scrollbar_thickness, scrollbar_thickness); 236 // return gfx::Size(scrollbar_thickness, scrollbar_thickness);
237 return gfx::Size(); 237 return gfx::Size();
238 } 238 }
239 239
(...skipping 2058 matching lines...) Expand 10 before | Expand all | Expand 10 after
2298 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME)); 2298 SetAccessibleName(l10n_util::GetString(IDS_PRODUCT_NAME));
2299 2299
2300 return view; 2300 return view;
2301 } 2301 }
2302 #endif 2302 #endif
2303 2303
2304 // static 2304 // static
2305 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 2305 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
2306 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 2306 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
2307 } 2307 }
OLDNEW
« no previous file with comments | « chrome/browser/views/extensions/extension_shelf.cc ('k') | chrome/browser/views/frame/glass_browser_frame_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698