Commit 5d92fe67 authored by Christopher Grant's avatar Christopher Grant Committed by Commit Bot

VR: Don't manipulate incognito tab state for regular tabs.

BUG=824969
R=mthiesse

Change-Id: Ifeb8f82e41ade9bdb10c7649cb7d2a4f1e06851c
Reviewed-on: https://chromium-review.googlesource.com/978659Reviewed-by: default avatarMichael Thiessen <mthiesse@chromium.org>
Commit-Queue: Christopher Grant <cjgrant@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545647}
parent e9aa27c9
......@@ -556,16 +556,20 @@ void VrShell::OnTabUpdated(JNIEnv* env,
jboolean incognito,
jint id,
jstring jtitle) {
incognito_tab_ids_.insert(id);
ui_->SetIncognitoTabsOpen(!incognito_tab_ids_.empty());
if (incognito) {
incognito_tab_ids_.insert(id);
ui_->SetIncognitoTabsOpen(!incognito_tab_ids_.empty());
}
}
void VrShell::OnTabRemoved(JNIEnv* env,
const JavaParamRef<jobject>& obj,
jboolean incognito,
jint id) {
incognito_tab_ids_.erase(id);
ui_->SetIncognitoTabsOpen(!incognito_tab_ids_.empty());
if (incognito) {
incognito_tab_ids_.erase(id);
ui_->SetIncognitoTabsOpen(!incognito_tab_ids_.empty());
}
}
void VrShell::SetAlertDialog(JNIEnv* env,
......
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