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

Unified Diff: mandoline/tab/frame.cc

Issue 1239313004: More html_viewer OOPIF changes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix compile Created 5 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
« no previous file with comments | « mandoline/tab/frame.h ('k') | mandoline/tab/frame_apptest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mandoline/tab/frame.cc
diff --git a/mandoline/tab/frame.cc b/mandoline/tab/frame.cc
index 89969c2fa91f18ed9efd8492e7c6dd0e6783d9e6..c9a4c0d985309643cfe83f555d1354dbb1aa5580 100644
--- a/mandoline/tab/frame.cc
+++ b/mandoline/tab/frame.cc
@@ -31,6 +31,9 @@ FrameDataPtr FrameToFrameData(const Frame* frame) {
frame_data->frame_id = frame->view()->id();
frame_data->parent_id =
frame->parent() ? frame->parent()->view()->id() : kNoParentId;
+ frame_data->name = frame->name();
+ // TODO(sky): implement me.
+ frame_data->origin = std::string();
return frame_data.Pass();
}
@@ -175,6 +178,15 @@ void Frame::NotifyRemoved(const Frame* source, const Frame* removed_node) {
child->NotifyRemoved(source, removed_node);
}
+void Frame::NotifyFrameNameChanged(const Frame* source) {
+ if (this != source) {
+ frame_tree_client_->OnFrameNameChanged(source->view_->id(), source->name_);
+ }
+
+ for (Frame* child : children_)
+ child->NotifyFrameNameChanged(source);
+}
+
void Frame::OnViewDestroying(mojo::View* view) {
if (parent_)
parent_->Remove(this);
@@ -231,4 +243,12 @@ void Frame::ProgressChanged(double progress) {
tree_->ProgressChanged();
}
+void Frame::SetFrameName(const mojo::String& name) {
+ if (name_ == name)
+ return;
+
+ name_ = name;
+ tree_->FrameNameChanged(this);
+}
+
} // namespace mandoline
« no previous file with comments | « mandoline/tab/frame.h ('k') | mandoline/tab/frame_apptest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698