| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/engine/session/blimp_engine_session.h" | 5 #include "blimp/engine/session/blimp_engine_session.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 #include "blimp/net/common.h" | 31 #include "blimp/net/common.h" |
| 32 #include "blimp/net/engine_authentication_handler.h" | 32 #include "blimp/net/engine_authentication_handler.h" |
| 33 #include "blimp/net/engine_connection_manager.h" | 33 #include "blimp/net/engine_connection_manager.h" |
| 34 #include "blimp/net/null_blimp_message_processor.h" | 34 #include "blimp/net/null_blimp_message_processor.h" |
| 35 #include "blimp/net/tcp_engine_transport.h" | 35 #include "blimp/net/tcp_engine_transport.h" |
| 36 #include "blimp/net/thread_pipe_manager.h" | 36 #include "blimp/net/thread_pipe_manager.h" |
| 37 #include "content/public/browser/browser_context.h" | 37 #include "content/public/browser/browser_context.h" |
| 38 #include "content/public/browser/browser_thread.h" | 38 #include "content/public/browser/browser_thread.h" |
| 39 #include "content/public/browser/navigation_controller.h" | 39 #include "content/public/browser/navigation_controller.h" |
| 40 #include "content/public/browser/navigation_entry.h" | 40 #include "content/public/browser/navigation_entry.h" |
| 41 #include "content/public/browser/render_frame_host.h" |
| 41 #include "content/public/browser/render_view_host.h" | 42 #include "content/public/browser/render_view_host.h" |
| 42 #include "content/public/browser/render_widget_host.h" | 43 #include "content/public/browser/render_widget_host.h" |
| 43 #include "content/public/browser/render_widget_host_view.h" | 44 #include "content/public/browser/render_widget_host_view.h" |
| 44 #include "content/public/browser/web_contents.h" | 45 #include "content/public/browser/web_contents.h" |
| 46 #include "content/public/common/menu_item.h" |
| 45 #include "net/base/ip_address.h" | 47 #include "net/base/ip_address.h" |
| 46 #include "net/base/net_errors.h" | 48 #include "net/base/net_errors.h" |
| 47 #include "ui/aura/client/default_capture_client.h" | 49 #include "ui/aura/client/default_capture_client.h" |
| 48 #include "ui/aura/env.h" | 50 #include "ui/aura/env.h" |
| 49 #include "ui/aura/window.h" | 51 #include "ui/aura/window.h" |
| 50 #include "ui/aura/window_tree_host.h" | 52 #include "ui/aura/window_tree_host.h" |
| 51 #include "ui/base/ime/input_method.h" | 53 #include "ui/base/ime/input_method.h" |
| 52 #include "ui/base/ime/text_input_client.h" | 54 #include "ui/base/ime/text_input_client.h" |
| 53 #include "ui/gfx/geometry/size.h" | 55 #include "ui/gfx/geometry/size.h" |
| 54 #include "ui/wm/core/base_focus_rules.h" | 56 #include "ui/wm/core/base_focus_rules.h" |
| (...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 render_widget_feature_.OnRenderWidgetInitialized(kDummyTabId, | 621 render_widget_feature_.OnRenderWidgetInitialized(kDummyTabId, |
| 620 new_host->GetWidget()); | 622 new_host->GetWidget()); |
| 621 } | 623 } |
| 622 | 624 |
| 623 void BlimpEngineSession::RenderViewDeleted( | 625 void BlimpEngineSession::RenderViewDeleted( |
| 624 content::RenderViewHost* render_view_host) { | 626 content::RenderViewHost* render_view_host) { |
| 625 render_widget_feature_.OnRenderWidgetDeleted(kDummyTabId, | 627 render_widget_feature_.OnRenderWidgetDeleted(kDummyTabId, |
| 626 render_view_host->GetWidget()); | 628 render_view_host->GetWidget()); |
| 627 } | 629 } |
| 628 | 630 |
| 631 void BlimpEngineSession::ShowPopupMenu( |
| 632 content::RenderFrameHost* render_frame_host, |
| 633 const gfx::Rect& bounds, |
| 634 int item_height, |
| 635 double item_font_size, |
| 636 int selected_item, |
| 637 const std::vector<content::MenuItem>& items, |
| 638 bool right_aligned, |
| 639 bool allow_multiple_selection) { |
| 640 NOTIMPLEMENTED() << " show " << items.size() << " items."; |
| 641 } |
| 642 |
| 643 void BlimpEngineSession::HidePopupMenu() { |
| 644 NOTIMPLEMENTED(); |
| 645 } |
| 646 |
| 629 void BlimpEngineSession::SendPageLoadStatusUpdate(PageLoadStatus load_status) { | 647 void BlimpEngineSession::SendPageLoadStatusUpdate(PageLoadStatus load_status) { |
| 630 bool page_load_completed = false; | 648 bool page_load_completed = false; |
| 631 | 649 |
| 632 switch (load_status) { | 650 switch (load_status) { |
| 633 case PageLoadStatus::LOADING: | 651 case PageLoadStatus::LOADING: |
| 634 page_load_completed = false; | 652 page_load_completed = false; |
| 635 break; | 653 break; |
| 636 case PageLoadStatus::LOADED: | 654 case PageLoadStatus::LOADED: |
| 637 page_load_completed = true; | 655 page_load_completed = true; |
| 638 break; | 656 break; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 659 page_load_tracker_.reset(new PageLoadTracker(web_contents_.get(), this)); | 677 page_load_tracker_.reset(new PageLoadTracker(web_contents_.get(), this)); |
| 660 aura::Window* parent = window_tree_host_->window(); | 678 aura::Window* parent = window_tree_host_->window(); |
| 661 aura::Window* content = web_contents_->GetNativeView(); | 679 aura::Window* content = web_contents_->GetNativeView(); |
| 662 if (!parent->Contains(content)) | 680 if (!parent->Contains(content)) |
| 663 parent->AddChild(content); | 681 parent->AddChild(content); |
| 664 content->Show(); | 682 content->Show(); |
| 665 } | 683 } |
| 666 | 684 |
| 667 } // namespace engine | 685 } // namespace engine |
| 668 } // namespace blimp | 686 } // namespace blimp |
| OLD | NEW |