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

Unified Diff: blimp/client/core/contents/navigation_feature.cc

Issue 2058263002: Tied up BlimpNavigationController to NavigationFeature (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blimp_core
Patch Set: kmarshall comments Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: blimp/client/core/contents/navigation_feature.cc
diff --git a/blimp/client/feature/navigation_feature.cc b/blimp/client/core/contents/navigation_feature.cc
similarity index 93%
rename from blimp/client/feature/navigation_feature.cc
rename to blimp/client/core/contents/navigation_feature.cc
index 9902230bc2f109e9f08bac2299276fe33196da8b..1eba2c16370d9dd443bf346d3921b7d5fb9c846f 100644
--- a/blimp/client/feature/navigation_feature.cc
+++ b/blimp/client/core/contents/navigation_feature.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "blimp/client/feature/navigation_feature.h"
+#include "blimp/client/core/contents/navigation_feature.h"
#include <map>
#include <string>
@@ -35,7 +35,8 @@ void NavigationFeature::SetDelegate(int tab_id,
}
void NavigationFeature::RemoveDelegate(int tab_id) {
- DelegateMap::iterator it = delegates_.find(tab_id);
+ base::SmallMap<std::map<int, NavigationFeatureDelegate*>>::iterator it =
Kevin M 2016/08/01 23:41:58 You can use "auto it"
shaktisahu 2016/08/02 17:47:53 Done.
+ delegates_.find(tab_id);
if (it != delegates_.end())
delegates_.erase(it);
}
@@ -127,8 +128,7 @@ void NavigationFeature::ProcessMessage(
}
if (details.has_page_load_completed()) {
- delegate->OnPageLoadStatusUpdate(tab_id,
- details.page_load_completed());
+ delegate->OnPageLoadStatusUpdate(tab_id, details.page_load_completed());
}
} break;
case NavigationMessage::LOAD_URL:
@@ -146,7 +146,8 @@ void NavigationFeature::ProcessMessage(
NavigationFeature::NavigationFeatureDelegate* NavigationFeature::FindDelegate(
const int tab_id) {
- DelegateMap::const_iterator it = delegates_.find(tab_id);
+ base::SmallMap<std::map<int, NavigationFeatureDelegate*>>::const_iterator it =
+ delegates_.find(tab_id);
if (it != delegates_.end())
return it->second;
return nullptr;

Powered by Google App Engine
This is Rietveld 408576698