summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-31 01:02:47 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-12-31 01:02:47 +0000
commit0142bd4f74b04cf27929e5288be100c09cff224d (patch)
tree930b5fbc7a4fadee2a823274e00cb47233ee9d2e
parent81516d6ea9c90491af15ee7009c449d253a89ec6 (diff)
downloadchromium_src-0142bd4f74b04cf27929e5288be100c09cff224d.zip
chromium_src-0142bd4f74b04cf27929e5288be100c09cff224d.tar.gz
chromium_src-0142bd4f74b04cf27929e5288be100c09cff224d.tar.bz2
Remove 'using' declaration of ScopedHDC from scoped_handle_win.h
BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6031011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70326 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--app/win_util.cc3
-rw-r--r--app/win_util.h3
-rw-r--r--base/scoped_handle_win.h1
-rw-r--r--chrome/browser/aeropeek_manager.cc5
-rw-r--r--chrome/service/cloud_print/print_system_win.cc3
-rw-r--r--gfx/native_theme_win.cc5
-rw-r--r--printing/emf_win_unittest.cc6
7 files changed, 15 insertions, 11 deletions
diff --git a/app/win_util.cc b/app/win_util.cc
index 31137e9..27a8235 100644
--- a/app/win_util.cc
+++ b/app/win_util.cc
@@ -21,6 +21,7 @@
#include "base/string_util.h"
#include "base/win_util.h"
#include "base/win/scoped_gdi_object.h"
+#include "base/win/scoped_hdc.h"
#include "gfx/codec/png_codec.h"
#include "gfx/gdi_util.h"
@@ -184,7 +185,7 @@ void GrabWindowSnapshot(HWND window_handle,
std::vector<unsigned char>* png_representation) {
// Create a memory DC that's compatible with the window.
HDC window_hdc = GetWindowDC(window_handle);
- ScopedHDC mem_hdc(CreateCompatibleDC(window_hdc));
+ base::win::ScopedHDC mem_hdc(CreateCompatibleDC(window_hdc));
// Create a DIB that's the same size as the window.
RECT content_rect = {0, 0, 0, 0};
diff --git a/app/win_util.h b/app/win_util.h
index 4f98e63..2fcd86b 100644
--- a/app/win_util.h
+++ b/app/win_util.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -23,7 +23,6 @@ namespace win_util {
// Import ScopedHandle and friends into this namespace for backwards
// compatibility. TODO(darin): clean this up!
using ::ScopedHandle;
-using ::ScopedHDC;
using ::ScopedBitmap;
// Simple scoped memory releaser class for COM allocated memory.
diff --git a/base/scoped_handle_win.h b/base/scoped_handle_win.h
index 8654ae0..8ec4862 100644
--- a/base/scoped_handle_win.h
+++ b/base/scoped_handle_win.h
@@ -12,5 +12,4 @@
using base::win::ScopedBitmap;
using base::win::ScopedHandle;
-using base::win::ScopedHDC;
using base::win::ScopedHGlobal;
diff --git a/chrome/browser/aeropeek_manager.cc b/chrome/browser/aeropeek_manager.cc
index 5281f8d..21d889d 100644
--- a/chrome/browser/aeropeek_manager.cc
+++ b/chrome/browser/aeropeek_manager.cc
@@ -16,6 +16,7 @@
#include "base/scoped_native_library.h"
#include "base/waitable_event.h"
#include "base/win/scoped_gdi_object.h"
+#include "base/win/scoped_hdc.h"
#include "base/win/windows_version.h"
#include "chrome/browser/app_icon_win.h"
#include "chrome/browser/browser_list.h"
@@ -340,7 +341,7 @@ class SendThumbnailTask : public Task {
// Create a DIB, copy the resized image, and send the DIB to Windows.
// We can delete this DIB after sending it to Windows since Windows creates
// a copy of the DIB and use it.
- ScopedHDC hdc(CreateCompatibleDC(NULL));
+ base::win::ScopedHDC hdc(CreateCompatibleDC(NULL));
if (!hdc.Get()) {
LOG(ERROR) << "cannot create a memory DC: " << GetLastError();
return;
@@ -454,7 +455,7 @@ class SendLivePreviewTask : public Task {
// tab image into the DIB, and send it to Windows.
// We don't need to paste this tab image onto the frame image since Windows
// automatically pastes it for us.
- ScopedHDC hdc(CreateCompatibleDC(NULL));
+ base::win::ScopedHDC hdc(CreateCompatibleDC(NULL));
if (!hdc.Get()) {
LOG(ERROR) << "cannot create a memory DC: " << GetLastError();
return;
diff --git a/chrome/service/cloud_print/print_system_win.cc b/chrome/service/cloud_print/print_system_win.cc
index 4369b54..8d92e3dfb 100644
--- a/chrome/service/cloud_print/print_system_win.cc
+++ b/chrome/service/cloud_print/print_system_win.cc
@@ -13,6 +13,7 @@
#include "base/utf_string_conversions.h"
#include "base/win/scoped_bstr.h"
#include "base/win/scoped_comptr.h"
+#include "base/win/scoped_hdc.h"
#include "chrome/service/cloud_print/cloud_print_consts.h"
#include "chrome/service/service_process.h"
#include "chrome/service/service_utility_process_host.h"
@@ -508,7 +509,7 @@ class PrintSystemWin : public PrintSystem {
PlatformJobId job_id_;
PrintSystem::JobSpooler::Delegate* delegate_;
int saved_dc_;
- ScopedHDC printer_dc_;
+ base::win::ScopedHDC printer_dc_;
FilePath print_data_file_path_;
DISALLOW_COPY_AND_ASSIGN(JobSpoolerWin::Core);
};
diff --git a/gfx/native_theme_win.cc b/gfx/native_theme_win.cc
index 6d143c9..a363524 100644
--- a/gfx/native_theme_win.cc
+++ b/gfx/native_theme_win.cc
@@ -11,6 +11,7 @@
#include "base/logging.h"
#include "base/scoped_handle.h"
+#include "base/win/scoped_hdc.h"
#include "base/win/windows_version.h"
#include "gfx/gdi_util.h"
#include "gfx/rect.h"
@@ -189,7 +190,7 @@ HRESULT NativeTheme::PaintMenuArrow(ThemeName theme,
// are needed for RTL locales on Vista. So use a memory DC and mirror
// the region with GDI's StretchBlt.
Rect r(*rect);
- ScopedHDC mem_dc(CreateCompatibleDC(hdc));
+ base::win::ScopedHDC mem_dc(CreateCompatibleDC(hdc));
ScopedBitmap mem_bitmap(CreateCompatibleBitmap(hdc, r.width(),
r.height()));
HGDIOBJ old_bitmap = SelectObject(mem_dc, mem_bitmap);
@@ -755,7 +756,7 @@ HRESULT NativeTheme::PaintFrameControl(HDC hdc,
if (mask_bitmap == NULL)
return E_OUTOFMEMORY;
- ScopedHDC bitmap_dc(CreateCompatibleDC(NULL));
+ base::win::ScopedHDC bitmap_dc(CreateCompatibleDC(NULL));
HGDIOBJ org_bitmap = SelectObject(bitmap_dc, mask_bitmap);
RECT local_rect = { 0, 0, width, height };
DrawFrameControl(bitmap_dc, &local_rect, type, state);
diff --git a/printing/emf_win_unittest.cc b/printing/emf_win_unittest.cc
index 9238425..edef14a 100644
--- a/printing/emf_win_unittest.cc
+++ b/printing/emf_win_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -15,6 +15,7 @@
#include "base/scoped_handle_win.h"
#include "base/scoped_ptr.h"
#include "base/scoped_temp_dir.h"
+#include "base/win/scoped_hdc.h"
#include "printing/printing_context.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -120,7 +121,8 @@ TEST_F(EmfPrintingTest, Enumerate) {
// Disabled if no "UnitTest printer" exists.
TEST_F(EmfPrintingTest, PageBreak) {
- ScopedHDC dc(CreateDC(L"WINSPOOL", L"UnitTest Printer", NULL, NULL));
+ base::win::ScopedHDC dc(
+ CreateDC(L"WINSPOOL", L"UnitTest Printer", NULL, NULL));
if (!dc.Get())
return;
printing::Emf emf;