OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/views/location_bar/script_bubble_icon_view.h" | 5 #include "chrome/browser/ui/views/location_bar/script_bubble_icon_view.h" |
6 | 6 |
7 #include "base/strings/string_number_conversions.h" | 7 #include "base/strings/string_number_conversions.h" |
8 #include "chrome/browser/ui/view_ids.h" | 8 #include "chrome/browser/ui/view_ids.h" |
9 #include "chrome/browser/ui/views/script_bubble_view.h" | 9 #include "chrome/browser/ui/views/script_bubble_view.h" |
10 #include "chrome/common/extensions/api/extension_action/action_info.h" | 10 #include "chrome/common/extensions/api/extension_action/action_info.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 if (event->type() == ui::ET_GESTURE_TAP) { | 89 if (event->type() == ui::ET_GESTURE_TAP) { |
90 ShowScriptBubble(this, location_bar_delegate_->GetWebContents()); | 90 ShowScriptBubble(this, location_bar_delegate_->GetWebContents()); |
91 event->SetHandled(); | 91 event->SetHandled(); |
92 } | 92 } |
93 } | 93 } |
94 | 94 |
95 void ScriptBubbleIconView::ShowScriptBubble(views::View* anchor_view, | 95 void ScriptBubbleIconView::ShowScriptBubble(views::View* anchor_view, |
96 WebContents* web_contents) { | 96 WebContents* web_contents) { |
97 ScriptBubbleView* script_bubble = new ScriptBubbleView(anchor_view, | 97 ScriptBubbleView* script_bubble = new ScriptBubbleView(anchor_view, |
98 web_contents); | 98 web_contents); |
99 views::BubbleDelegateView::CreateBubble(script_bubble); | 99 views::BubbleDelegateView::CreateBubble(script_bubble)->Show(); |
100 script_bubble->Show(); | |
101 } | 100 } |
OLD | NEW |