Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(85)

Side by Side Diff: chrome/browser/ui/views/browser_bubble_gtk.cc

Issue 6334101: Removal of chrome.experimental.popup set of APIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/browser_bubble.h" 5 #include "chrome/browser/ui/views/browser_bubble.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "chrome/browser/ui/views/frame/browser_view.h" 9 #include "chrome/browser/ui/views/frame/browser_view.h"
10 #include "views/widget/widget_gtk.h" 10 #include "views/widget/widget_gtk.h"
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 private: 77 private:
78 BrowserBubble* bubble_; 78 BrowserBubble* bubble_;
79 79
80 DISALLOW_COPY_AND_ASSIGN(BubbleWidget); 80 DISALLOW_COPY_AND_ASSIGN(BubbleWidget);
81 }; 81 };
82 82
83 } // namespace 83 } // namespace
84 84
85 void BrowserBubble::InitPopup() { 85 void BrowserBubble::InitPopup() {
86 // TODO(port) 86 // TODO(port)
87 DCHECK(!drop_shadow_enabled_) <<
88 "Drop shadows not supported on GTK browser bubbles.";
89
90 views::WidgetGtk* pop = new BubbleWidget(this); 87 views::WidgetGtk* pop = new BubbleWidget(this);
91 pop->SetOpacity(0xFF); 88 pop->SetOpacity(0xFF);
92 pop->make_transient_to_parent(); 89 pop->make_transient_to_parent();
93 pop->Init(frame_->GetNativeView(), bounds_); 90 pop->Init(frame_->GetNativeView(), bounds_);
94 #if defined(OS_CHROMEOS) 91 #if defined(OS_CHROMEOS)
95 { 92 {
96 vector<int> params; 93 vector<int> params;
97 params.push_back(0); // don't show while screen is locked 94 params.push_back(0); // don't show while screen is locked
98 chromeos::WmIpc::instance()->SetWindowType( 95 chromeos::WmIpc::instance()->SetWindowType(
99 pop->GetNativeView(), 96 pop->GetNativeView(),
(...skipping 19 matching lines...) Expand all
119 visible_ = true; 116 visible_ = true;
120 } 117 }
121 118
122 void BrowserBubble::Hide() { 119 void BrowserBubble::Hide() {
123 if (!visible_) 120 if (!visible_)
124 return; 121 return;
125 views::WidgetGtk* pop = static_cast<views::WidgetGtk*>(popup_); 122 views::WidgetGtk* pop = static_cast<views::WidgetGtk*>(popup_);
126 pop->Hide(); 123 pop->Hide();
127 visible_ = false; 124 visible_ = false;
128 } 125 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/browser_bubble.cc ('k') | chrome/browser/ui/views/browser_bubble_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698