Chromium Code Reviews| Index: components/html_viewer/html_frame.cc |
| diff --git a/components/html_viewer/html_frame.cc b/components/html_viewer/html_frame.cc |
| index 9cd02558e509a0752bfb304ed874baeb099e6565..2dd138eae85a287b1870d3c1ca273cd5dd617d0e 100644 |
| --- a/components/html_viewer/html_frame.cc |
| +++ b/components/html_viewer/html_frame.cc |
| @@ -133,6 +133,9 @@ HTMLFrame::HTMLFrame(CreateParams* params) |
| SetReplicatedFrameStateFromClientProperties(params->properties, &state_); |
| + // TODO(lukasza): Add |frame_unique_name| to ReplicatedFrameState? |
| + blink::WebString unique_name; // Empty string = will recalculate in Blink. |
| + |
| if (!parent_) { |
| CreateRootWebWidget(); |
| @@ -187,14 +190,15 @@ HTMLFrame::HTMLFrame(CreateParams* params) |
| previous_sibling ? previous_sibling->web_frame() : nullptr; |
| CHECK(!parent_->IsLocal()); |
| web_frame_ = parent_->web_frame()->toWebRemoteFrame()->createLocalChild( |
| - state_.tree_scope, state_.name, state_.sandbox_flags, this, |
| + state_.tree_scope, state_.name, unique_name, state_.sandbox_flags, this, |
| previous_web_frame, |
| // TODO(lazyboy): Replicate WebFrameOwnerProperties where needed. |
| blink::WebFrameOwnerProperties()); |
| CreateLocalRootWebWidget(web_frame_->toWebLocalFrame()); |
| } else if (!parent_->IsLocal()) { |
| web_frame_ = parent_->web_frame()->toWebRemoteFrame()->createRemoteChild( |
| - state_.tree_scope, state_.name, state_.sandbox_flags, this); |
| + state_.tree_scope, state_.name, unique_name, state_.sandbox_flags, |
| + this); |
| } else { |
| CHECK(params->is_local_create_child); |
| @@ -326,14 +330,16 @@ blink::WebFrame* HTMLFrame::createChildFrame( |
| blink::WebLocalFrame* parent, |
| blink::WebTreeScopeType scope, |
| const blink::WebString& frame_name, |
| + const blink::WebString& /* frame_unique_name */, |
| blink::WebSandboxFlags sandbox_flags, |
| - const blink::WebFrameOwnerProperties& frame_owner_properties) { |
| + const blink::WebFrameOwnerProperties& /* frame_owner_properties */) { |
| DCHECK(IsLocal()); // Can't create children of remote frames. |
| DCHECK_EQ(parent, web_frame_); |
| DCHECK(window_); // If we're local we have to have a window. |
| // Create the window that will house the frame now. We embed once we know the |
| // url (see decidePolicyForNavigation()). |
| mus::Window* child_window = window_->connection()->NewWindow(); |
| + // TODO(lukasza): Add |frame_unique_name| to ReplicatedFrameState? |
| ReplicatedFrameState child_state; |
| child_state.name = frame_name; |
| child_state.tree_scope = scope; |
| @@ -480,8 +486,10 @@ void HTMLFrame::dispatchLoad() { |
| server_->DispatchLoadEventToParent(); |
| } |
| -void HTMLFrame::didChangeName(blink::WebLocalFrame* frame, |
| - const blink::WebString& name) { |
| +void HTMLFrame::didChangeName(blink::WebLocalFrame* /* frame */, |
|
alexmos
2016/02/10 00:46:46
Is this style ok? I haven't really seen this (lea
Łukasz Anforowicz
2016/02/10 22:10:50
I don't remember where I first saw this style, but
Charlie Reis
2016/02/11 22:02:14
It's moot in this case, since this file is gone no
Łukasz Anforowicz
2016/02/11 23:23:55
Right, but 1) we are not "omitting" the parameter
|
| + const blink::WebString& name, |
| + const blink::WebString& /* unique_name */) { |
| + // TODO(lukasza): Add |frame_unique_name| to ReplicatedFrameState? |
| state_.name = name; |
| server_->SetClientProperty(kPropertyFrameName, |
| FrameNameToClientProperty(name)); |