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

Side by Side Diff: content/shell/common/shell_content_client.cc

Issue 2835203005: Draw the text area resizer with drawing commands (Closed)
Patch Set: New baselines Created 3 years, 7 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
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/resources/textAreaResizeCorner.png » ('j') | 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "content/shell/common/shell_content_client.h" 5 #include "content/shell/common/shell_content_client.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/string_piece.h" 8 #include "base/strings/string_piece.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "blink/public/resources/grit/blink_image_resources.h" 10 #include "blink/public/resources/grit/blink_image_resources.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 ui::ScaleFactor scale_factor) const { 65 ui::ScaleFactor scale_factor) const {
66 if (switches::IsRunLayoutTestSwitchPresent()) { 66 if (switches::IsRunLayoutTestSwitchPresent()) {
67 switch (resource_id) { 67 switch (resource_id) {
68 case IDR_BROKENIMAGE: 68 case IDR_BROKENIMAGE:
69 #if defined(OS_MACOSX) 69 #if defined(OS_MACOSX)
70 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG; 70 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_PNG;
71 #else 71 #else
72 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_GIF; 72 resource_id = IDR_CONTENT_SHELL_MISSING_IMAGE_GIF;
73 #endif 73 #endif
74 break; 74 break;
75
76 case IDR_TEXTAREA_RESIZER:
77 resource_id = IDR_CONTENT_SHELL_TEXT_AREA_RESIZE_CORNER_PNG;
78 break;
79 } 75 }
80 } 76 }
81 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale( 77 return ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
82 resource_id, scale_factor); 78 resource_id, scale_factor);
83 } 79 }
84 80
85 base::RefCountedMemory* ShellContentClient::GetDataResourceBytes( 81 base::RefCountedMemory* ShellContentClient::GetDataResourceBytes(
86 int resource_id) const { 82 int resource_id) const {
87 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id); 83 return ResourceBundle::GetSharedInstance().LoadDataResourceBytes(resource_id);
88 } 84 }
89 85
90 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const { 86 gfx::Image& ShellContentClient::GetNativeImageNamed(int resource_id) const {
91 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id); 87 return ResourceBundle::GetSharedInstance().GetNativeImageNamed(resource_id);
92 } 88 }
93 89
94 bool ShellContentClient::IsSupplementarySiteIsolationModeEnabled() { 90 bool ShellContentClient::IsSupplementarySiteIsolationModeEnabled() {
95 return base::CommandLine::ForCurrentProcess()->HasSwitch( 91 return base::CommandLine::ForCurrentProcess()->HasSwitch(
96 switches::kIsolateSitesForTesting); 92 switches::kIsolateSitesForTesting);
97 } 93 }
98 94
99 OriginTrialPolicy* ShellContentClient::GetOriginTrialPolicy() { 95 OriginTrialPolicy* ShellContentClient::GetOriginTrialPolicy() {
100 return &origin_trial_policy_; 96 return &origin_trial_policy_;
101 } 97 }
102 98
103 } // namespace content 99 } // namespace content
OLDNEW
« no previous file with comments | « content/shell/BUILD.gn ('k') | content/shell/resources/textAreaResizeCorner.png » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698