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

Side by Side Diff: views/widget/native_widget_win.cc

Issue 7552039: Vend common GL context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address reviewer comments. Created 9 years, 4 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 | « views/widget/native_widget_gtk.cc ('k') | no next file » | 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) 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 "views/widget/native_widget_win.h" 5 #include "views/widget/native_widget_win.h"
6 6
7 #include <dwmapi.h> 7 #include <dwmapi.h>
8 #include <shellapi.h> 8 #include <shellapi.h>
9 9
10 #include "base/string_util.h" 10 #include "base/string_util.h"
(...skipping 2286 matching lines...) Expand 10 before | Expand all | Expand 10 after
2297 2297
2298 void NativeWidgetWin::ClientAreaSizeChanged() { 2298 void NativeWidgetWin::ClientAreaSizeChanged() {
2299 RECT r; 2299 RECT r;
2300 if (WidgetSizeIsClientSize()) 2300 if (WidgetSizeIsClientSize())
2301 GetClientRect(&r); 2301 GetClientRect(&r);
2302 else 2302 else
2303 GetWindowRect(&r); 2303 GetWindowRect(&r);
2304 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)), 2304 gfx::Size s(std::max(0, static_cast<int>(r.right - r.left)),
2305 std::max(0, static_cast<int>(r.bottom - r.top))); 2305 std::max(0, static_cast<int>(r.bottom - r.top)));
2306 if (compositor_.get()) 2306 if (compositor_.get())
2307 compositor_->OnWidgetSizeChanged(s); 2307 compositor_->WidgetSizeChanged(s);
2308 delegate_->OnNativeWidgetSizeChanged(s); 2308 delegate_->OnNativeWidgetSizeChanged(s);
2309 if (use_layered_buffer_) { 2309 if (use_layered_buffer_) {
2310 layered_window_contents_.reset( 2310 layered_window_contents_.reset(
2311 new gfx::CanvasSkia(s.width(), s.height(), false)); 2311 new gfx::CanvasSkia(s.width(), s.height(), false));
2312 } 2312 }
2313 } 2313 }
2314 2314
2315 void NativeWidgetWin::ResetWindowRegion(bool force) { 2315 void NativeWidgetWin::ResetWindowRegion(bool force) {
2316 // A native frame uses the native window region, and we don't want to mess 2316 // A native frame uses the native window region, and we don't want to mess
2317 // with it. 2317 // with it.
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
2530 return (GetKeyState(VK_LBUTTON) & 0x80) || 2530 return (GetKeyState(VK_LBUTTON) & 0x80) ||
2531 (GetKeyState(VK_RBUTTON) & 0x80) || 2531 (GetKeyState(VK_RBUTTON) & 0x80) ||
2532 (GetKeyState(VK_MBUTTON) & 0x80) || 2532 (GetKeyState(VK_MBUTTON) & 0x80) ||
2533 (GetKeyState(VK_XBUTTON1) & 0x80) || 2533 (GetKeyState(VK_XBUTTON1) & 0x80) ||
2534 (GetKeyState(VK_XBUTTON2) & 0x80); 2534 (GetKeyState(VK_XBUTTON2) & 0x80);
2535 } 2535 }
2536 2536
2537 } // namespace internal 2537 } // namespace internal
2538 2538
2539 } // namespace views 2539 } // namespace views
OLDNEW
« no previous file with comments | « views/widget/native_widget_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698