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

Side by Side Diff: chrome/browser/ui/extensions/shell_window.cc

Issue 10822004: Draggable region support for frameless app window on Windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix per feedback Created 8 years, 4 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) 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/extensions/shell_window.h" 5 #include "chrome/browser/ui/extensions/shell_window.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/extensions/extension_process_manager.h" 8 #include "chrome/browser/extensions/extension_process_manager.h"
9 #include "chrome/browser/extensions/shell_window_registry.h" 9 #include "chrome/browser/extensions/shell_window_registry.h"
10 #include "chrome/browser/file_select_helper.h" 10 #include "chrome/browser/file_select_helper.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 if (!web_contents()->GetController().GetActiveEntry() || 246 if (!web_contents()->GetController().GetActiveEntry() ||
247 web_contents()->GetController().GetActiveEntry()->GetTitle().empty()) 247 web_contents()->GetController().GetActiveEntry()->GetTitle().empty())
248 return UTF8ToUTF16(extension()->name()); 248 return UTF8ToUTF16(extension()->name());
249 return web_contents()->GetTitle(); 249 return web_contents()->GetTitle();
250 } 250 }
251 251
252 bool ShellWindow::OnMessageReceived(const IPC::Message& message) { 252 bool ShellWindow::OnMessageReceived(const IPC::Message& message) {
253 bool handled = true; 253 bool handled = true;
254 IPC_BEGIN_MESSAGE_MAP(ShellWindow, message) 254 IPC_BEGIN_MESSAGE_MAP(ShellWindow, message)
255 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest) 255 IPC_MESSAGE_HANDLER(ExtensionHostMsg_Request, OnRequest)
256 IPC_MESSAGE_HANDLER(ExtensionHostMsg_UpdateDraggableRegions,
257 UpdateDraggableRegions)
256 IPC_MESSAGE_UNHANDLED(handled = false) 258 IPC_MESSAGE_UNHANDLED(handled = false)
257 IPC_END_MESSAGE_MAP() 259 IPC_END_MESSAGE_MAP()
258 return handled; 260 return handled;
259 } 261 }
260 262
261 void ShellWindow::CloseContents(WebContents* contents) { 263 void ShellWindow::CloseContents(WebContents* contents) {
262 Close(); 264 Close();
263 } 265 }
264 266
265 bool ShellWindow::ShouldSuppressDialogs() { 267 bool ShellWindow::ShouldSuppressDialogs() {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 extension_function_dispatcher_.Dispatch(params, 354 extension_function_dispatcher_.Dispatch(params,
353 web_contents_->GetRenderViewHost()); 355 web_contents_->GetRenderViewHost());
354 } 356 }
355 357
356 void ShellWindow::AddMessageToDevToolsConsole(ConsoleMessageLevel level, 358 void ShellWindow::AddMessageToDevToolsConsole(ConsoleMessageLevel level,
357 const std::string& message) { 359 const std::string& message) {
358 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost(); 360 content::RenderViewHost* rvh = web_contents_->GetRenderViewHost();
359 rvh->Send(new ExtensionMsg_AddMessageToConsole( 361 rvh->Send(new ExtensionMsg_AddMessageToConsole(
360 rvh->GetRoutingID(), level, message)); 362 rvh->GetRoutingID(), level, message));
361 } 363 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698