Commit dc31a5a6 authored by sungmann.cho's avatar sungmann.cho Committed by Commit bot

Replace all occurrences of words meaning "off the record" with "incognito"

BUG=3333
TEST=None

Review-Url: https://codereview.chromium.org/2129373002
Cr-Commit-Position: refs/heads/master@{#404592}
parent 3ebd4914
......@@ -160,19 +160,15 @@ void BrowserDesktopWindowTreeHostWin::PostHandleMSG(UINT message,
UpdateDWMFrame();
// Windows lies to us about the position of the minimize button before a
// window is visible. We use this position to place the OTR avatar in RTL
// mode, so when the window is shown, we need to re-layout and schedule a
// paint for the non-client frame view so that the icon top has the
// correct
// position when the window becomes visible. This fixes bugs where the
// icon
// appears to overlay the minimize button.
// Note that we will call Layout every time SetWindowPos is called with
// SWP_SHOWWINDOW, however callers typically are careful about not
// specifying this flag unless necessary to avoid flicker.
// This may be invoked during creation on XP and before the
// non_client_view
// has been created.
// window is visible. We use this position to place the incognito avatar
// in RTL mode, so when the window is shown, we need to re-layout and
// schedule a paint for the non-client frame view so that the icon top has
// the correct position when the window becomes visible. This fixes bugs
// where the icon appears to overlay the minimize button. Note that we
// will call Layout every time SetWindowPos is called with SWP_SHOWWINDOW,
// however callers typically are careful about not specifying this flag
// unless necessary to avoid flicker. This may be invoked during creation
// on XP and before the non_client_view has been created.
WINDOWPOS* window_pos = reinterpret_cast<WINDOWPOS*>(l_param);
if (window_pos->flags & SWP_SHOWWINDOW &&
GetWidget()->non_client_view()) {
......
......@@ -152,8 +152,8 @@ void BrowserHeaderPainterAsh::Init(
view_ = header_view;
window_icon_ = window_icon;
caption_button_container_ = caption_button_container;
// Use light images in otr, even when a custom theme is installed. The
// otr window with a custom theme is still darker than a normal window.
// Use light images in incognito, even when a custom theme is installed. The
// incognito window with a custom theme is still darker than a normal window.
caption_button_container_->SetUseLightImages(is_incognito_);
}
......
......@@ -55,7 +55,7 @@ BrowserNonClientFrameView::~BrowserNonClientFrameView() {
void BrowserNonClientFrameView::OnBrowserViewInitViewsComplete() {}
gfx::ImageSkia BrowserNonClientFrameView::GetOTRAvatarIcon() const {
gfx::ImageSkia BrowserNonClientFrameView::GetIncognitoAvatarIcon() const {
if (!ui::MaterialDesignController::IsModeMaterial())
return *GetThemeProviderForProfile()->GetImageSkiaNamed(IDR_OTR_ICON);
const SkColor icon_color = color_utils::PickContrastingColor(
......@@ -170,7 +170,7 @@ void BrowserNonClientFrameView::UpdateProfileIndicatorIcon() {
gfx::Image icon;
const Profile* profile = browser_view()->browser()->profile();
if (profile->GetProfileType() == Profile::INCOGNITO_PROFILE) {
icon = gfx::Image(GetOTRAvatarIcon());
icon = gfx::Image(GetIncognitoAvatarIcon());
if (!ui::MaterialDesignController::IsModeMaterial())
profile_indicator_icon_->EnableCanvasFlippingForRTLUI(true);
} else {
......
......@@ -41,8 +41,8 @@ class BrowserNonClientFrameView : public views::NonClientFrameView,
// Returns the amount that the theme background should be inset.
virtual int GetThemeBackgroundXInset() const = 0;
// Retrieves the icon to use in the frame to indicate an OTR window.
gfx::ImageSkia GetOTRAvatarIcon() const;
// Retrieves the icon to use in the frame to indicate an incognito window.
gfx::ImageSkia GetIncognitoAvatarIcon() const;
// Returns COLOR_TOOLBAR_TOP_SEPARATOR[,_INACTIVE] depending on the activation
// state of the window.
......
......@@ -440,8 +440,8 @@ bool BrowserNonClientFrameViewAsh::DoesIntersectRect(
int BrowserNonClientFrameViewAsh::GetTabStripLeftInset() const {
const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
const int avatar_right = profile_indicator_icon()
? (insets.left() + GetOTRAvatarIcon().width())
: 0;
? (insets.left() + GetIncognitoAvatarIcon().width())
: 0;
return avatar_right + insets.right();
}
......@@ -478,7 +478,7 @@ void BrowserNonClientFrameViewAsh::LayoutProfileIndicatorIcon() {
DCHECK(browser_view()->IsTabStripVisible());
#endif
const gfx::ImageSkia incognito_icon = GetOTRAvatarIcon();
const gfx::ImageSkia incognito_icon = GetIncognitoAvatarIcon();
const gfx::Insets avatar_insets = GetLayoutInsets(AVATAR_ICON);
const int avatar_bottom = GetTopInset(false) +
browser_view()->GetTabStripHeight() - avatar_insets.bottom();
......
......@@ -406,8 +406,8 @@ bool BrowserNonClientFrameViewMus::DoesIntersectRect(
int BrowserNonClientFrameViewMus::GetTabStripLeftInset() const {
const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
const int avatar_right = profile_indicator_icon()
? (insets.left() + GetOTRAvatarIcon().width())
: 0;
? (insets.left() + GetIncognitoAvatarIcon().width())
: 0;
return avatar_right + insets.right() + frame_values().normal_insets.left();
}
......@@ -456,7 +456,7 @@ void BrowserNonClientFrameViewMus::LayoutIncognitoButton() {
// ChromeOS shows avatar on V1 app.
DCHECK(browser_view()->IsTabStripVisible());
#endif
gfx::ImageSkia incognito_icon = GetOTRAvatarIcon();
gfx::ImageSkia incognito_icon = GetIncognitoAvatarIcon();
gfx::Insets avatar_insets = GetLayoutInsets(AVATAR_ICON);
int avatar_bottom = GetTopInset(false) + browser_view()->GetTabStripHeight() -
avatar_insets.bottom();
......
......@@ -1973,8 +1973,8 @@ void BrowserView::GetAccessibleState(ui::AXViewState* state) {
void BrowserView::OnThemeChanged() {
if (!IsRegularOrGuestSession() &&
ui::MaterialDesignController::IsModeMaterial()) {
// When the theme changes, the native theme may also change (in OTR, the
// usage of dark or normal hinges on the browser theme), so we have to
// When the theme changes, the native theme may also change (in incognito,
// the usage of dark or normal hinges on the browser theme), so we have to
// propagate both kinds of change.
base::AutoReset<bool> reset(&handling_theme_changed_, true);
#if defined(OS_WIN)
......
......@@ -150,8 +150,8 @@ class BrowserView : public BrowserWindow,
// window.
gfx::Rect GetFindBarBoundingBox() const;
// Returns the preferred height of the TabStrip. Used to position the OTR
// avatar icon.
// Returns the preferred height of the TabStrip. Used to position the
// incognito avatar icon.
int GetTabStripHeight() const;
// Takes some view's origin (relative to this BrowserView) and offsets it such
......
......@@ -553,7 +553,7 @@ void GlassBrowserFrameView::LayoutProfileSwitcher() {
void GlassBrowserFrameView::LayoutIncognitoIcon() {
const bool md = ui::MaterialDesignController::IsModeMaterial();
const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
const gfx::Size size(GetOTRAvatarIcon().size());
const gfx::Size size(GetIncognitoAvatarIcon().size());
int x = ClientBorderThickness(false);
// In RTL, the icon needs to start after the caption buttons.
if (CaptionButtonsOnLeadingEdge()) {
......
......@@ -384,8 +384,8 @@ bool OpaqueBrowserFrameView::IsRegularOrGuestSession() const {
return browser_view()->IsRegularOrGuestSession();
}
gfx::ImageSkia OpaqueBrowserFrameView::GetOTRAvatarIcon() const {
return BrowserNonClientFrameView::GetOTRAvatarIcon();
gfx::ImageSkia OpaqueBrowserFrameView::GetIncognitoAvatarIcon() const {
return BrowserNonClientFrameView::GetIncognitoAvatarIcon();
}
bool OpaqueBrowserFrameView::IsMaximized() const {
......
......@@ -81,7 +81,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView,
gfx::Size GetBrowserViewMinimumSize() const override;
bool ShouldShowCaptionButtons() const override;
bool IsRegularOrGuestSession() const override;
gfx::ImageSkia GetOTRAvatarIcon() const override;
gfx::ImageSkia GetIncognitoAvatarIcon() const override;
bool IsMaximized() const override;
bool IsMinimized() const override;
bool IsFullscreen() const override;
......
......@@ -381,7 +381,7 @@ void OpaqueBrowserFrameViewLayout::LayoutIncognitoIcon(views::View* host) {
if (incognito_icon_) {
const gfx::Insets insets(GetLayoutInsets(AVATAR_ICON));
const gfx::Size size(delegate_->GetOTRAvatarIcon().size());
const gfx::Size size(delegate_->GetIncognitoAvatarIcon().size());
const int incognito_width = insets.left() + size.width();
int x;
if (ShouldIncognitoIconBeOnRight()) {
......
......@@ -36,7 +36,7 @@ class OpaqueBrowserFrameViewLayoutDelegate {
// We don't have a ThemeProvider in the layout manager, so plumb in the icon
// source here.
virtual gfx::ImageSkia GetOTRAvatarIcon() const = 0;
virtual gfx::ImageSkia GetIncognitoAvatarIcon() const = 0;
// Controls window state.
virtual bool IsMaximized() const = 0;
......
......@@ -60,7 +60,7 @@ class TestLayoutDelegate : public OpaqueBrowserFrameViewLayoutDelegate {
return show_caption_buttons_;
}
bool IsRegularOrGuestSession() const override { return true; }
gfx::ImageSkia GetOTRAvatarIcon() const override {
gfx::ImageSkia GetIncognitoAvatarIcon() const override {
return gfx::ImageSkia(gfx::ImageSkiaRep(gfx::Size(40, 29), 1.0f));
}
bool IsMaximized() const override { return maximized_; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment