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

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

Issue 108040: Send array of paint rects and bitmaps as opposed to a Union (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 canvas->ScaleInt(-1, 1); 154 canvas->ScaleInt(-1, 1);
155 canvas->save(); 155 canvas->save();
156 } 156 }
157 canvas->DrawBitmapInt(*bitmap, width() - bitmap->width(), 157 canvas->DrawBitmapInt(*bitmap, width() - bitmap->width(),
158 height() - bitmap->height()); 158 height() - bitmap->height());
159 if (rtl_dir) 159 if (rtl_dir)
160 canvas->restore(); 160 canvas->restore();
161 } 161 }
162 162
163 static gfx::Size GetSize() { 163 static gfx::Size GetSize() {
164 // This is disabled until we find what makes us slower when we let 164 return gfx::Size(views::NativeScrollBar::GetVerticalScrollBarWidth(),
165 // WebKit know that we have a resizer rect... 165 views::NativeScrollBar::GetHorizontalScrollBarHeight());
166 // return gfx::Size(views::NativeScrollBar::GetVerticalScrollBarWidth(),
167 // views::NativeScrollBar::GetHorizontalScrollBarHeight());
168 return gfx::Size();
169 } 166 }
170 167
171 virtual gfx::Size GetPreferredSize() { 168 virtual gfx::Size GetPreferredSize() {
172 views::Window* window = GetWindow(); 169 views::Window* window = GetWindow();
173 return (!window || window->IsMaximized() || window->IsFullscreen()) ? 170 return (!window || window->IsMaximized() || window->IsFullscreen()) ?
174 gfx::Size() : GetSize(); 171 gfx::Size() : GetSize();
175 } 172 }
176 173
177 virtual void Layout() { 174 virtual void Layout() {
178 views::View* parent_view = GetParent(); 175 views::View* parent_view = GetParent();
(...skipping 1108 matching lines...) Expand 10 before | Expand all | Expand 10 after
1287 1284
1288 /////////////////////////////////////////////////////////////////////////////// 1285 ///////////////////////////////////////////////////////////////////////////////
1289 // BrowserView, private: 1286 // BrowserView, private:
1290 1287
1291 void BrowserView::Init() { 1288 void BrowserView::Init() {
1292 // Stow a pointer to this object onto the window handle so that we can get 1289 // Stow a pointer to this object onto the window handle so that we can get
1293 // at it later when all we have is a native view. 1290 // at it later when all we have is a native view.
1294 #if defined(OS_WIN) 1291 #if defined(OS_WIN)
1295 SetProp(GetWidget()->GetNativeView(), kBrowserViewKey, this); 1292 SetProp(GetWidget()->GetNativeView(), kBrowserViewKey, this);
1296 #else 1293 #else
1297 g_object_set_data(G_OBJECT(GetWidget()->GetNativeView()), kBrowserViewKey, thi s); 1294 g_object_set_data(G_OBJECT(GetWidget()->GetNativeView()), kBrowserViewKey,
1295 this);
1298 #endif 1296 #endif
1299 1297
1300 // Start a hung plugin window detector for this browser object (as long as 1298 // Start a hung plugin window detector for this browser object (as long as
1301 // hang detection is not disabled). 1299 // hang detection is not disabled).
1302 if (!CommandLine::ForCurrentProcess()->HasSwitch( 1300 if (!CommandLine::ForCurrentProcess()->HasSwitch(
1303 switches::kDisableHangMonitor)) { 1301 switches::kDisableHangMonitor)) {
1304 InitHangMonitor(); 1302 InitHangMonitor();
1305 } 1303 }
1306 1304
1307 LoadAccelerators(); 1305 LoadAccelerators();
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
1735 1733
1736 // static 1734 // static
1737 FindBar* BrowserWindow::CreateFindBar(Browser* browser) { 1735 FindBar* BrowserWindow::CreateFindBar(Browser* browser) {
1738 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window())); 1736 return browser::CreateFindBar(static_cast<BrowserView*>(browser->window()));
1739 } 1737 }
1740 1738
1741 // static 1739 // static
1742 void BrowserList::AllBrowsersClosed() { 1740 void BrowserList::AllBrowsersClosed() {
1743 views::Window::CloseAllSecondaryWindows(); 1741 views::Window::CloseAllSecondaryWindows();
1744 } 1742 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698