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

Side by Side Diff: chrome/browser/ui/webui/web_ui_util.cc

Issue 11301007: Load the resources for max scale factor first. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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) 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 "chrome/browser/ui/webui/web_ui_util.h" 5 #include "chrome/browser/ui/webui/web_ui_util.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/base64.h" 9 #include "base/base64.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 CHECK(args->GetBoolean(start_index++, &ctrl_key)); 78 CHECK(args->GetBoolean(start_index++, &ctrl_key));
79 CHECK(args->GetBoolean(start_index++, &meta_key)); 79 CHECK(args->GetBoolean(start_index++, &meta_key));
80 CHECK(args->GetBoolean(start_index++, &shift_key)); 80 CHECK(args->GetBoolean(start_index++, &shift_key));
81 return disposition_utils::DispositionFromClick(button == 1.0, alt_key, 81 return disposition_utils::DispositionFromClick(button == 1.0, alt_key,
82 ctrl_key, meta_key, shift_key); 82 ctrl_key, meta_key, shift_key);
83 83
84 } 84 }
85 85
86 bool ParseScaleFactor(const base::StringPiece& identifier, 86 bool ParseScaleFactor(const base::StringPiece& identifier,
87 ui::ScaleFactor* scale_factor) { 87 ui::ScaleFactor* scale_factor) {
88 *scale_factor = ui::SCALE_FACTOR_NONE; 88 *scale_factor = ui::SCALE_FACTOR_100P;
89 for (size_t i = 0; i < arraysize(kScaleFactorMap); i++) { 89 for (size_t i = 0; i < arraysize(kScaleFactorMap); i++) {
90 if (identifier == kScaleFactorMap[i].name) { 90 if (identifier == kScaleFactorMap[i].name) {
91 *scale_factor = kScaleFactorMap[i].scale_factor; 91 *scale_factor = kScaleFactorMap[i].scale_factor;
92 return true; 92 return true;
93 } 93 }
94 } 94 }
95 return false; 95 return false;
96 } 96 }
97 97
98 void ParsePathAndScale(const GURL& url, 98 void ParsePathAndScale(const GURL& url,
(...skipping 16 matching lines...) Expand all
115 // Strip scale factor specification from path. 115 // Strip scale factor specification from path.
116 stripped_path.remove_suffix(stripped_path.length() - pos); 116 stripped_path.remove_suffix(stripped_path.length() - pos);
117 stripped_path.CopyToString(path); 117 stripped_path.CopyToString(path);
118 } 118 }
119 if (scale_factor) 119 if (scale_factor)
120 *scale_factor = factor; 120 *scale_factor = factor;
121 } 121 }
122 } 122 }
123 123
124 } // namespace web_ui_util 124 } // namespace web_ui_util
OLDNEW
« no previous file with comments | « chrome/browser/ui/webui/fileicon_source.cc ('k') | chrome/browser/ui/webui/web_ui_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698