Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / sad_tab_view.cc
index 913025a..173455e 100644 (file)
@@ -9,15 +9,15 @@
 #include "base/metrics/field_trial.h"
 #include "base/metrics/histogram.h"
 #include "base/strings/utf_string_conversions.h"
-#include "chrome/browser/feedback/feedback_util.h"
 #include "chrome/browser/ui/browser.h"
 #include "chrome/browser/ui/browser_finder.h"
 #include "chrome/browser/ui/chrome_pages.h"
 #include "chrome/common/url_constants.h"
+#include "chrome/grit/generated_resources.h"
+#include "components/feedback/feedback_util.h"
 #include "content/public/browser/navigation_controller.h"
 #include "content/public/browser/web_contents.h"
-#include "content/public/browser/web_contents_view.h"
-#include "grit/generated_resources.h"
+#include "grit/components_strings.h"
 #include "grit/theme_resources.h"
 #include "ui/base/l10n/l10n_util.h"
 #include "ui/base/resource/resource_bundle.h"
@@ -178,7 +178,7 @@ void SadTabView::LinkClicked(views::Link* source, int event_flags) {
         chrome::kCrashReasonURL : chrome::kKillReasonURL);
     OpenURLParams params(
         help_url, content::Referrer(), CURRENT_TAB,
-        content::PAGE_TRANSITION_LINK, false);
+        ui::PAGE_TRANSITION_LINK, false);
     web_contents_->OpenURL(params);
   } else if (source == feedback_link_) {
     chrome::ShowFeedbackPage(
@@ -239,7 +239,7 @@ void SadTabView::Show() {
   // It is not possible to create a native_widget_win that has no parent in
   // and later re-parent it.
   // TODO(avi): This is a cheat. Can this be made cleaner?
-  sad_tab_params.parent = web_contents_->GetView()->GetNativeView();
+  sad_tab_params.parent = web_contents_->GetNativeView();
 
   set_owned_by_client();
 
@@ -248,9 +248,8 @@ void SadTabView::Show() {
   sad_tab->SetContentsView(this);
 
   views::Widget::ReparentNativeView(sad_tab->GetNativeView(),
-                                    web_contents_->GetView()->GetNativeView());
-  gfx::Rect bounds;
-  web_contents_->GetView()->GetContainerBounds(&bounds);
+                                    web_contents_->GetNativeView());
+  gfx::Rect bounds = web_contents_->GetContainerBounds();
   sad_tab->SetBounds(gfx::Rect(bounds.size()));
 }