X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=src%2Fcontent%2Fshell%2Fbrowser%2Fshell_views.cc;h=fda7fbcd46b87e4d63c72c3f19b5067651f889ea;hb=004985e17e624662a4c85c76a7654039dc83f028;hp=a2684b52be773e759d77ecea52e1db2d4a1e96f7;hpb=2f108dbacb161091e42a3479f4e171339b7e7623;p=platform%2Fframework%2Fweb%2Fcrosswalk.git diff --git a/src/content/shell/browser/shell_views.cc b/src/content/shell/browser/shell_views.cc index a2684b5..fda7fbc 100644 --- a/src/content/shell/browser/shell_views.cc +++ b/src/content/shell/browser/shell_views.cc @@ -8,7 +8,6 @@ #include "base/strings/utf_string_conversions.h" #include "content/public/browser/render_widget_host_view.h" #include "content/public/browser/web_contents.h" -#include "content/public/browser/web_contents_view.h" #include "content/public/common/context_menu_params.h" #include "content/shell/browser/shell_platform_data_aura.h" #include "ui/aura/client/screen_position_client.h" @@ -24,7 +23,6 @@ #include "ui/views/controls/button/label_button.h" #include "ui/views/controls/button/menu_button.h" #include "ui/views/controls/button/menu_button_listener.h" -#include "ui/views/controls/menu/menu_item_view.h" #include "ui/views/controls/menu/menu_runner.h" #include "ui/views/controls/textfield/textfield.h" #include "ui/views/controls/textfield/textfield_controller.h" @@ -139,7 +137,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, web_view_ = new views::WebView(web_contents->GetBrowserContext()); web_view_->SetWebContents(web_contents); web_view_->SetPreferredSize(size); - web_contents->GetView()->Focus(); + web_contents->Focus(); contents_view_->AddChildView(web_view_); Layout(); @@ -175,7 +173,7 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, // Convert from content coordinates to window coordinates. // This code copied from chrome_web_contents_view_delegate_views.cc aura::Window* web_contents_window = - shell_->web_contents()->GetView()->GetNativeView(); + shell_->web_contents()->GetNativeView(); aura::Window* root_window = web_contents_window->GetRootWindow(); aura::client::ScreenPositionClient* screen_position_client = aura::client::GetScreenPositionClient(root_window); @@ -189,11 +187,14 @@ class ShellWindowDelegateView : public views::WidgetDelegateView, new views::MenuRunner(context_menu_model_.get())); if (context_menu_runner_->RunMenuAt(web_view_->GetWidget(), - NULL, gfx::Rect(screen_point, gfx::Size()), - views::MenuItemView::TOPRIGHT, ui::MENU_SOURCE_NONE, - views::MenuRunner::CONTEXT_MENU) == - views::MenuRunner::MENU_DELETED) - return; + NULL, + gfx::Rect(screen_point, gfx::Size()), + views::MENU_ANCHOR_TOPRIGHT, + ui::MENU_SOURCE_NONE, + views::MenuRunner::CONTEXT_MENU) == + views::MenuRunner::MENU_DELETED) { + return; + } } void OnWebContentsFocused(content::WebContents* web_contents) { @@ -512,7 +513,7 @@ void Shell::PlatformCreateWindow(int width, int height) { void Shell::PlatformSetContents() { if (headless_) { CHECK(platform_); - aura::Window* content = web_contents_->GetView()->GetNativeView(); + aura::Window* content = web_contents_->GetNativeView(); aura::Window* parent = platform_->host()->window(); if (!parent->Contains(content)) { parent->AddChild(content);