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

Side by Side Diff: extensions/browser/api/system_display/system_display_apitest.cc

Issue 1549643002: Switch to standard integer types in extensions/browser/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@clean
Patch Set: Created 5 years 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stdint.h>
6
5 #include <utility> 7 #include <utility>
6 8
7 #include "base/debug/leak_annotations.h" 9 #include "base/debug/leak_annotations.h"
10 #include "base/macros.h"
8 #include "base/strings/string_number_conversions.h" 11 #include "base/strings/string_number_conversions.h"
12 #include "build/build_config.h"
9 #include "extensions/browser/api/system_display/display_info_provider.h" 13 #include "extensions/browser/api/system_display/display_info_provider.h"
10 #include "extensions/browser/api/system_display/system_display_api.h" 14 #include "extensions/browser/api/system_display/system_display_api.h"
11 #include "extensions/browser/api_test_utils.h" 15 #include "extensions/browser/api_test_utils.h"
12 #include "extensions/common/api/system_display.h" 16 #include "extensions/common/api/system_display.h"
13 #include "extensions/shell/test/shell_apitest.h" 17 #include "extensions/shell/test/shell_apitest.h"
14 #include "ui/gfx/display.h" 18 #include "ui/gfx/display.h"
15 #include "ui/gfx/display_observer.h" 19 #include "ui/gfx/display_observer.h"
16 #include "ui/gfx/screen.h" 20 #include "ui/gfx/screen.h"
17 21
18 namespace extensions { 22 namespace extensions {
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 std::string GetSetInfoDisplayId() const { return set_info_display_id_; } 101 std::string GetSetInfoDisplayId() const { return set_info_display_id_; }
98 102
99 bool unified_desktop_enabled() const { return unified_desktop_enabled_; } 103 bool unified_desktop_enabled() const { return unified_desktop_enabled_; }
100 104
101 private: 105 private:
102 // Update the content of the |unit| obtained for |display| using 106 // Update the content of the |unit| obtained for |display| using
103 // platform specific method. 107 // platform specific method.
104 void UpdateDisplayUnitInfoForPlatform( 108 void UpdateDisplayUnitInfoForPlatform(
105 const gfx::Display& display, 109 const gfx::Display& display,
106 extensions::api::system_display::DisplayUnitInfo* unit) override { 110 extensions::api::system_display::DisplayUnitInfo* unit) override {
107 int64 id = display.id(); 111 int64_t id = display.id();
108 unit->name = "DISPLAY NAME FOR " + base::Int64ToString(id); 112 unit->name = "DISPLAY NAME FOR " + base::Int64ToString(id);
109 if (id == 1) 113 if (id == 1)
110 unit->mirroring_source_id = "0"; 114 unit->mirroring_source_id = "0";
111 unit->is_primary = id == 0 ? true : false; 115 unit->is_primary = id == 0 ? true : false;
112 unit->is_internal = id == 0 ? true : false; 116 unit->is_internal = id == 0 ? true : false;
113 unit->is_enabled = true; 117 unit->is_enabled = true;
114 unit->rotation = (90 * id) % 360; 118 unit->rotation = (90 * id) % 360;
115 unit->dpi_x = 96.0; 119 unit->dpi_x = 96.0;
116 unit->dpi_y = 96.0; 120 unit->dpi_y = 96.0;
117 if (id == 0) { 121 if (id == 0) {
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
292 enable_unified_function->set_extension(test_extension.get()); 296 enable_unified_function->set_extension(test_extension.get());
293 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(), 297 ASSERT_TRUE(api_test_utils::RunFunction(enable_unified_function.get(),
294 "[false]", browser_context())); 298 "[false]", browser_context()));
295 EXPECT_FALSE(provider_->unified_desktop_enabled()); 299 EXPECT_FALSE(provider_->unified_desktop_enabled());
296 } 300 }
297 } 301 }
298 302
299 #endif // defined(OS_CHROMEOS) 303 #endif // defined(OS_CHROMEOS)
300 304
301 } // namespace extensions 305 } // namespace extensions
OLDNEW
« no previous file with comments | « extensions/browser/api/system_display/system_display_api.cc ('k') | extensions/browser/api/system_info/system_info_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698