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

Side by Side Diff: content/renderer/render_widget.cc

Issue 1992393002: Enable external popup menu in Blimp, part 1/2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and update blimp_engine.gn Created 4 years, 6 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/renderer/render_widget.h ('k') | no next file » | 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/renderer/render_widget.h" 5 #include "content/renderer/render_widget.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 screen_info_ = emulator->original_screen_info(); 427 screen_info_ = emulator->original_screen_info();
428 device_scale_factor_ = screen_info_.deviceScaleFactor; 428 device_scale_factor_ = screen_info_.deviceScaleFactor;
429 } 429 }
430 430
431 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) { 431 gfx::Rect RenderWidget::AdjustValidationMessageAnchor(const gfx::Rect& anchor) {
432 if (screen_metrics_emulator_) 432 if (screen_metrics_emulator_)
433 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor); 433 return screen_metrics_emulator_->AdjustValidationMessageAnchor(anchor);
434 return anchor; 434 return anchor;
435 } 435 }
436 436
437 #if defined(OS_MACOSX) || defined(OS_ANDROID) 437 #if defined(USE_EXTERNAL_POPUP_MENU)
438 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation( 438 void RenderWidget::SetExternalPopupOriginAdjustmentsForEmulation(
439 ExternalPopupMenu* popup, 439 ExternalPopupMenu* popup,
440 RenderWidgetScreenMetricsEmulator* emulator) { 440 RenderWidgetScreenMetricsEmulator* emulator) {
441 popup->SetOriginScaleAndOffsetForEmulation( 441 popup->SetOriginScaleAndOffsetForEmulation(
442 emulator->scale(), emulator->offset()); 442 emulator->scale(), emulator->offset());
443 } 443 }
444 #endif 444 #endif
445 445
446 void RenderWidget::OnShowHostContextMenu(ContextMenuParams* params) { 446 void RenderWidget::OnShowHostContextMenu(ContextMenuParams* params) {
447 if (screen_metrics_emulator_) 447 if (screen_metrics_emulator_)
(...skipping 1642 matching lines...) Expand 10 before | Expand all | Expand 10 after
2090 } 2090 }
2091 2091
2092 float RenderWidget::GetOriginalDeviceScaleFactor() const { 2092 float RenderWidget::GetOriginalDeviceScaleFactor() const {
2093 return 2093 return
2094 screen_metrics_emulator_ ? 2094 screen_metrics_emulator_ ?
2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor : 2095 screen_metrics_emulator_->original_screen_info().deviceScaleFactor :
2096 device_scale_factor_; 2096 device_scale_factor_;
2097 } 2097 }
2098 2098
2099 } // namespace content 2099 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_widget.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698