| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/ime/ime_window.h" | 5 #include "chrome/browser/ui/ime/ime_window.h" |
| 6 | 6 |
| 7 #include <utility> | 7 #include <utility> |
| 8 | 8 |
| 9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 content::WebContents::CreateParams create_params(profile, | 64 content::WebContents::CreateParams create_params(profile, |
| 65 std::move(site_instance)); | 65 std::move(site_instance)); |
| 66 if (opener_render_frame_host) { | 66 if (opener_render_frame_host) { |
| 67 create_params.opener_render_process_id = | 67 create_params.opener_render_process_id = |
| 68 opener_render_frame_host->GetProcess()->GetID(); | 68 opener_render_frame_host->GetProcess()->GetID(); |
| 69 create_params.opener_render_frame_id = | 69 create_params.opener_render_frame_id = |
| 70 opener_render_frame_host->GetRoutingID(); | 70 opener_render_frame_host->GetRoutingID(); |
| 71 } | 71 } |
| 72 web_contents_.reset(content::WebContents::Create(create_params)); | 72 web_contents_.reset(content::WebContents::Create(create_params)); |
| 73 web_contents_->SetDelegate(this); | 73 web_contents_->SetDelegate(this); |
| 74 content::OpenURLParams params(gurl, content::Referrer(), SINGLETON_TAB, | 74 content::OpenURLParams params(gurl, content::Referrer(), |
| 75 WindowOpenDisposition::SINGLETON_TAB, |
| 75 ui::PAGE_TRANSITION_LINK, false); | 76 ui::PAGE_TRANSITION_LINK, false); |
| 76 web_contents_->OpenURL(params); | 77 web_contents_->OpenURL(params); |
| 77 | 78 |
| 78 native_window_ = CreateNativeWindow(this, bounds, web_contents_.get()); | 79 native_window_ = CreateNativeWindow(this, bounds, web_contents_.get()); |
| 79 } | 80 } |
| 80 | 81 |
| 81 void ImeWindow::Show() { | 82 void ImeWindow::Show() { |
| 82 native_window_->Show(); | 83 native_window_->Show(); |
| 83 } | 84 } |
| 84 | 85 |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 190 bounds.set_width(pos.width()); | 191 bounds.set_width(pos.width()); |
| 191 bounds.set_height(pos.height()); | 192 bounds.set_height(pos.height()); |
| 192 native_window_->SetBounds(bounds); | 193 native_window_->SetBounds(bounds); |
| 193 } | 194 } |
| 194 | 195 |
| 195 bool ImeWindow::IsPopupOrPanel(const content::WebContents* source) const { | 196 bool ImeWindow::IsPopupOrPanel(const content::WebContents* source) const { |
| 196 return true; | 197 return true; |
| 197 } | 198 } |
| 198 | 199 |
| 199 } // namespace ui | 200 } // namespace ui |
| OLD | NEW |