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

Unified Diff: ui/base/resource/resource_bundle_win.cc

Issue 854713003: More old files deletion. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix tryjobs? Created 5 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/base/resource/resource_bundle_win.h ('k') | ui/base/resource/resource_data_dll_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/resource/resource_bundle_win.cc
diff --git a/ui/base/resource/resource_bundle_win.cc b/ui/base/resource/resource_bundle_win.cc
deleted file mode 100644
index fa17eee50316d09eb2242857b7ef49377d00f13f..0000000000000000000000000000000000000000
--- a/ui/base/resource/resource_bundle_win.cc
+++ /dev/null
@@ -1,76 +0,0 @@
-// Copyright (c) 2012 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.
-
-#include "ui/base/resource/resource_bundle_win.h"
-
-#include "base/logging.h"
-#include "base/path_service.h"
-#include "base/strings/utf_string_conversions.h"
-#include "skia/ext/image_operations.h"
-#include "ui/base/layout.h"
-#include "ui/base/resource/resource_bundle.h"
-#include "ui/base/resource/resource_data_dll_win.h"
-#include "ui/gfx/geometry/size_conversions.h"
-#include "ui/gfx/image/image_skia.h"
-#include "ui/gfx/image/image_skia_source.h"
-#include "ui/gfx/win/dpi.h"
-
-namespace ui {
-
-namespace {
-
-HINSTANCE resources_data_dll;
-
-HINSTANCE GetCurrentResourceDLL() {
- if (resources_data_dll)
- return resources_data_dll;
- return GetModuleHandle(NULL);
-}
-
-base::FilePath GetResourcesPakFilePath(const std::string& pak_name) {
- base::FilePath path;
- if (PathService::Get(base::DIR_MODULE, &path))
- return path.AppendASCII(pak_name.c_str());
-
- // Return just the name of the pack file.
- return base::FilePath(base::ASCIIToUTF16(pak_name));
-}
-
-} // namespace
-
-void ResourceBundle::LoadCommonResources() {
- // As a convenience, add the current resource module as a data packs.
- data_packs_.push_back(new ResourceDataDLL(GetCurrentResourceDLL()));
-
- if (IsScaleFactorSupported(SCALE_FACTOR_100P)) {
- AddDataPackFromPath(
- GetResourcesPakFilePath("chrome_100_percent.pak"),
- SCALE_FACTOR_100P);
- }
- if (IsScaleFactorSupported(SCALE_FACTOR_200P)) {
- DCHECK(gfx::IsHighDPIEnabled());
- AddDataPackFromPath(
- GetResourcesPakFilePath("chrome_200_percent.pak"),
- SCALE_FACTOR_200P);
- }
-}
-
-gfx::Image& ResourceBundle::GetNativeImageNamed(int resource_id, ImageRTL rtl) {
- // Flipped image is not used on Windows.
- DCHECK_EQ(rtl, RTL_DISABLED);
-
- // Windows only uses SkBitmap for gfx::Image, so this is the same as
- // GetImageNamed.
- return GetImageNamed(resource_id);
-}
-
-void SetResourcesDataDLL(HINSTANCE handle) {
- resources_data_dll = handle;
-}
-
-HICON LoadThemeIconFromResourcesDataDLL(int icon_id) {
- return ::LoadIcon(GetCurrentResourceDLL(), MAKEINTRESOURCE(icon_id));
-}
-
-} // namespace ui;
« no previous file with comments | « ui/base/resource/resource_bundle_win.h ('k') | ui/base/resource/resource_data_dll_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698